Timber v1.0.11 Timber.Transports.HTTP.HackneyClient
An efficient HTTP client that leverages hackney, keep alive connections, and connection pools to communicate with the Timber API.
Configuration
config :timber, :hackney_client,
request_options: [
connect_timeout: 5_000, # 5 seconds, timeout to connect
recv_timeout: 20_000 # 20 seconds, timeout to receive a response
],
pool_options: [
timeout: 600_000, # 10 minutes, how long the connection is kept alive in the pool
max_connections: 10 # number of connections maintained in the pool
]
:request_options
- Passed to:hackney.request(method, url, headers, body, request_options)
.:pool_options
- Passed to:hackney_pool.start_pool(@pool_name, pool_options)
.
Summary
Functions
Issues a HTTP request via hackney
Takes a process message type and body and determines if the async request sent in
async_request/5
is complete