tuweni / org.apache.tuweni.scuttlebutt.rpc / RPCResponse

RPCResponse

open class RPCResponse (source)

A successful RPC response.

Constructors

<init>

RPCResponse(body: Bytes, bodyType: BodyType)

A successful RPC response.

Functions

asJSON

open fun <T : Any> asJSON(objectMapper: ObjectMapper, clazz: Class<T>): T

Provides the body of the message, marshalled as a JSON object.

open fun <T : Any> asJSON(objectMapper: ObjectMapper, typeReference: TypeReference<T>): T

asString

open fun asString(): String

Provides the body of the message as a UTF-8 string.

body

open fun body(): Bytes

bodyType

open fun bodyType(): BodyType