post Aptos Full Node And Get Data
inline suspend fun <T, V> postAptosFullNodeAndGetData(options: RequestOptions.PostAptosRequestOptions<V>): Result<T, AptosSdkError>
A convenience wrapper for postAptosFullNode that only returns the deserialized data on success.
Usage
val resolution = aptos.postAptosFullNodeAndGetData<MyData, MyBody>(options)
when (resolution) {
is Result.Ok -> {
val data = resolution.value
println("Success! Just the data: $data")
}
is Result.Err -> println("Error posting data: ${resolution.error.message}")
}Content copied to clipboard
Return
A Result which is either Ok containing only the deserialized data T, or Err containing an AptosSdkError.