API Reference salemove_http_client v2.1.0-rc.1
Modules
Generic HTTP client built on top of Tesla and used to build specific JSON API HTTP clients with ability to configure them during runtime, using, for example, environment variables.
Custom Tesla adapter which allows to specify adapter in request options. It also allows configuring adapter at runtime, using, for example, environment variables.
An error that occurs when server responds with 4xx status
Indicates error on transport level
A module, responsible for creating a EngagementRouter.HttpClient.Response
from Tesla
response, or, if request wasn't successful, for creating one
of exception structures.
A generic error that occurs when server responds with non-2xx status
An error that occurs when request/response body is not valid JSON
Log requests as single line.
Allows headers to be a map instead of a list.
A generic HTTP client response. Contains response headers, status and body.
An error that occurs when server responds with 500 or 501 status
An error that occurs when server responds any status > 501
An error that occurs when server responds with 3xx status
An error that occurs when server responds with status < 200
This case template can be used to easily mock Tesla responses
without messing up manually with Tesla.Env
using helper
allow_http_request/1
and assert_requested/2
macro.