lib/async/http/client.rb in async-http-0.45.9 vs lib/async/http/client.rb in async-http-0.46.0
- old
+ new
@@ -32,9 +32,13 @@
# 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).
+ # @param endpoint [Endpoint] the endpoint to connnect to.
+ # @param protocol [Protocol::HTTP1 | Protocol::HTTP2 | Protocol::HTTPS] the protocol to use.
+ # @param scheme [String] The default scheme to set to requests.
+ # @param authority [String] The default authority to set to requests.
def initialize(endpoint, protocol = endpoint.protocol, scheme = endpoint.scheme, authority = endpoint.authority, retries: 3, connection_limit: nil)
@endpoint = endpoint
@protocol = protocol
@retries = retries