Interface JsonRpcClientResponse
- All Superinterfaces:
AutoCloseable, HttpClientResponse
A representation of a JSON-RPC client response.
-
Method Summary
Modifier and TypeMethodDescriptionGet a complete response representation as a JSON object.error()Get an error set on this response.headers()Response headers.URI of the last request.default StringProtocol selected by WebClient for this response.result()Get the result in this response.rpcId()Get the JSON-RPC ID set on this response.status()Response status.trailers()Response trailer headers.Methods inherited from interface HttpClientResponse
as, close, entity, inputStream, sourceModifier and TypeMethodDescriptiondefault <T> TRead the entity as a specific type.voidclose()Closes the response.entity()Response entity.default InputStreamEntity input stream.default <T extends Source<?>>
voidsource(GenericType<T> sourceType, T source) Registers a source listener for this response.
-
Method Details
-
rpcId
-
result
Optional<JsonRpcResult> result()Get the result in this response.- Returns:
- the optional response result
-
error
-
asJsonObject
JsonObject asJsonObject()Get a complete response representation as a JSON object.- Returns:
- a JSON object that represents the response
-
protocolId
Protocol selected by WebClient for this response.The default implementation returns
http/1.1.- Returns:
- protocol identifier, such as
http/1.1,h2, orh3
-
status
-
headers
-
trailers
ClientResponseTrailers trailers()Response trailer headers. Blocks until trailers are available.- Returns:
- trailers
- Throws:
IllegalStateException- when invoked before entity is requested
-
lastEndpointUri
-