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

RPCResponse

open class RPCResponse (source)

A successful RPC response.

Constructors

<init>

A successful RPC response.

RPCResponse(body: Bytes!, bodyType: BodyType!)

Functions

asJSON

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

open fun <T : Any!> asJSON(objectMapper: ObjectMapper!, clazz: Class<T>!): Topen fun <T : Any!> asJSON(objectMapper: ObjectMapper!, typeReference: TypeReference<T>!): T

asString

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

open fun asString(): String!

body

Response body

open fun body(): Bytes!

bodyType

Responsse body type

open fun bodyType(): BodyType!