JsonRpc::HttpClient
Inherits JsonRpc::Client / Reference / Object
Implements JSON-RPC over HTTP transport. Uses POST requests and doesn't support notifications to be received.
Authentication
To do authentication, configure the HTTP::Client you pass in as needed.
An example for HTTP Basic auth:
http_client = HTTP::Client.new("some.internal.server", 1234)
http_client.basic_auth("my-username", "the-password")
rpc_client = JsonRpc::HttpClient.new(http_client)
# rpc_client will now use basic authentication for each request!
Constructors
Instance methods
endpoint
Sourcehttp_client
Sourceinspect(io)
Sourcerecv_message(id)
Dummy implementation, this client doesn't use a persistant connection, and will never receive a remotely-initiated packet.
send_message(id, message_data)
Source