Class: Seahorse::Client::NetHttp::Handler Private

Inherits:
Handler
  • Object
show all
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, TruncatedBodyError

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, Errno::EHOSTUNREACH, Errno::ECONNREFUSED,
  OpenSSL::SSL::SSLError, OpenSSL::SSL::SSLErrorWaitReadable,
  Net::HTTPFatalError # for proxy connection failures
]
DNS_ERROR_MESSAGES =

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', # MacOS
  'getaddrinfo: Name or service not known' # GNU
]

Instance Attribute Summary

Attributes inherited from Handler

#handler

Instance Method Summary collapse

Methods inherited from Handler

#initialize, #inspect

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.

Parameters:

Returns:



44
45
46
47
48
49
50
51
52
53
# File 'lib/seahorse/client/net_http/handler.rb', line 44

def call(context)
  span_wrapper(context) do
    transmit(
      context.config,
      context.http_request,
      context.http_response
    )
  end
  Response.new(context: context)
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.

Parameters:

Returns:



57
58
59
# File 'lib/seahorse/client/net_http/handler.rb', line 57

def pool_for(config)
  ConnectionPool.for(pool_options(config))
end