Class: Seahorse::Client::NetHttp::Handler Private
- Defined in:
- lib/seahorse/client/net_http/handler.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The default HTTP handler for Seahorse::Client. This is based on the Ruby’s ‘Net::HTTP`.
Defined Under Namespace
Classes: InvalidHttpVerbError
Constant Summary collapse
- NETWORK_ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[ SocketError, EOFError, IOError, Timeout::Error, Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL, Errno::ETIMEDOUT, OpenSSL::SSL::SSLError ]
- DNS_ERROR_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'getaddrinfo: nodename nor servname provided, or not known'
Instance Attribute Summary
Attributes inherited from Handler
Instance Method Summary collapse
- #call(context) ⇒ Response private
- #pool_for(config) ⇒ ConnectionPool private
Methods inherited from Handler
Constructor Details
This class inherits a constructor from Seahorse::Client::Handler
Instance Method Details
#call(context) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 29 30 31 32 |
# File 'lib/seahorse/client/net_http/handler.rb', line 24 def call(context) response = Response.new(context: context) begin transmit(context.config, context.http_request, context.http_response) rescue *NETWORK_ERRORS => error response.error = Http::Error.new(error, (context, error)) end response end |
#pool_for(config) ⇒ ConnectionPool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/seahorse/client/net_http/handler.rb', line 36 def pool_for(config) ConnectionPool.for((config)) end |