Module io.helidon.webclient.jsonrpc
Package io.helidon.webclient.jsonrpc
Interface JsonRpcClientRequest
- All Superinterfaces:
ClientRequest<JsonRpcClientRequest>
A representation of JSON-RPC client request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webclient.api.ClientRequest
ClientRequest.OutputStreamHandler
-
Method Summary
Modifier and TypeMethodDescriptiondefault JsonRpcClientRequest
addParam
(int value) Add an array param value of type int to this request.Add an array param value on this request.default JsonRpcClientRequest
Add an array param value of type string to this request.Add this request to the current batch.Get a complete representation of this request as a JSON object.default JsonRpcClientRequest
Set a named param of type int on this request.Set a named param on this request.default JsonRpcClientRequest
Set a named param of type string on this request.default JsonRpcClientRequest
rpcId
(int value) Set an int JSON-RPC ID on this request.Set a JSON-RPC ID on this request.default JsonRpcClientRequest
Set a string JSON-RPC ID on this request.Set a JSON-RPC method on this request.submit()
Submit this request to the server and get a response.Methods inherited from interface io.helidon.webclient.api.ClientRequest
accept, accept, connection, contentType, followRedirects, followRedirects, fragment, fragment, header, header, header, headers, headers, headers, keepAlive, maxRedirects, maxRedirects, outputStream, outputStream, path, pathParam, property, proxy, queryParam, readContinueTimeout, readTimeout, request, request, requestEntity, resolvedUri, sendExpectContinue, skipUriEncoding, submit, submit, tls, uri, uri, uri
-
Method Details
-
rpcMethod
Set a JSON-RPC method on this request. Normally this is done using either viaJsonRpcClient
orJsonRpcClientBatchRequest
.- Parameters:
rpcMethod
- the JSON-RPC method- Returns:
- this request
- See Also:
-
rpcId
Set a JSON-RPC ID on this request.- Parameters:
value
- the ID as a JSON value- Returns:
- this request
-
rpcId
Set an int JSON-RPC ID on this request.- Parameters:
value
- the ID as an int- Returns:
- this request
-
rpcId
Set a string JSON-RPC ID on this request.- Parameters:
value
- the ID as a string- Returns:
- this request
-
param
Set a named param on this request.- Parameters:
name
- the namevalue
- the value as a JSON value- Returns:
- this request
-
param
Set a named param of type string on this request.- Parameters:
name
- the namevalue
- the value as a string- Returns:
- this request
-
param
Set a named param of type int on this request.- Parameters:
name
- the namevalue
- the value as an int- Returns:
- this request
-
addParam
Add an array param value on this request.- Parameters:
value
- the value as JSON value- Returns:
- this request
-
addParam
Add an array param value of type int to this request.- Parameters:
value
- the value as int value- Returns:
- this request
-
addParam
Add an array param value of type string to this request.- Parameters:
value
- the value as a string- Returns:
- this request
-
submit
JsonRpcClientResponse submit()Submit this request to the server and get a response.- Returns:
- a response
-
addToBatch
JsonRpcClientBatchRequest addToBatch()Add this request to the current batch.- Returns:
- the batch
- Throws:
IllegalStateException
- if not part of a batch
-
asJsonObject
JsonObject asJsonObject()Get a complete representation of this request as a JSON object.- Returns:
- this request as a JSON object
-