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, OpenSSL::SSL::SSLError,
  Errno::EHOSTUNREACH, Errno::ECONNREFUSED
]
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.



46
47
48
49
# File 'lib/seahorse/client/net_http/handler.rb', line 46

def call(context)
  transmit(context.config, context.http_request, context.http_response)
  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.



53
54
55
# File 'lib/seahorse/client/net_http/handler.rb', line 53

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