Async::HTTPSourceAsyncHTTPClient

class Client

Nested

Definitions

def initialize(endpoint, protocol: endpoint.protocol, scheme: endpoint.scheme, authority: endpoint.authority, retries: DEFAULT_RETRIES, **options)

Provides a robust interface to a server.

  • If there are no connections, it will create one.
  • If there are already connections, it will reuse it.
  • If a request fails, it will retry it up to N times if it was idempotent. The client object will never become unusable. It internally manages persistent connections (or non-persistent connections if that's required).

Implementation

def initialize(endpoint, protocol: endpoint.protocol, scheme: endpoint.scheme, authority: endpoint.authority, retries: DEFAULT_RETRIES, **options)
	@endpoint = endpoint
	@protocol = protocol
	
	@retries = retries
	@pool = make_pool(**options)
	
	@scheme = scheme
	@authority = authority
end