Module: Philiprehberger::HttpClient

Defined in:
lib/philiprehberger/http_client.rb,
lib/philiprehberger/http_client/pool.rb,
lib/philiprehberger/http_client/cache.rb,
lib/philiprehberger/http_client/client.rb,
lib/philiprehberger/http_client/errors.rb,
lib/philiprehberger/http_client/metrics.rb,
lib/philiprehberger/http_client/retries.rb,
lib/philiprehberger/http_client/version.rb,
lib/philiprehberger/http_client/response.rb,
lib/philiprehberger/http_client/multipart.rb,
lib/philiprehberger/http_client/connection.rb,
lib/philiprehberger/http_client/cookie_jar.rb,
lib/philiprehberger/http_client/body_encoder.rb

Defined Under Namespace

Modules: BodyEncoder, Connection, Multipart, Retries Classes: Cache, Client, ConfigurationError, CookieJar, Error, HttpError, Metrics, NetworkError, Pool, Response, TimeoutError

Constant Summary collapse

VERSION =
'0.8.2'

Class Method Summary collapse

Class Method Details

.new(**options) ⇒ Client

Convenience constructor.

Parameters:

Returns:



22
23
24
# File 'lib/philiprehberger/http_client.rb', line 22

def self.new(**options)
  Client.new(**options)
end

.open {|Client| ... } ⇒ Object

Block form — creates a client, yields it, and ensures cleanup.

Parameters:

Yields:

Returns:

  • (Object)

    the return value of the block



31
32
33
# File 'lib/philiprehberger/http_client.rb', line 31

def self.open(...)
  Client.open(...)
end