JSON::RPC::HTTPTransport
Inherits JSON::RPC::Transport < Reference < Object
The default transport: POSTs each request to a fixed HTTP endpoint.
Subclass and override {#call} (or {#post}) to layer in behavior such as CSRF token handling or automatic re-authentication.
Constructors
Instance methods
Adds HTTP Basic authentication credentials to every request.
Sends body (a serialized JSON-RPC request) and returns the raw
response body. Must raise {TransportError} on any transport-level
failure.
Headers sent with every request. Mutable so subclasses and callers can adjust authentication or session tokens between calls.
Headers sent with every request. Mutable so subclasses and callers can adjust authentication or session tokens between calls.
Performs the raw HTTP POST. Exposed as a seam for subclasses that need to inspect or retry the response (e.g. CSRF token negotiation).