Tesla.Env (tex v0.1.0)
This module defines a Tesla.Env.t/0
struct that stores all data related to request/response.
Fields
:method
- method of request. Example::get
:url
- request url. Example:"https://www.google.com"
:query
- list of query params. Example:[{"param", "value"}]
will be translated to?params=value
. Note: query params passed in url (e.g."/get?param=value"
) are not parsed toquery
field.:headers
- list of request/response headers. Example:[{"content-type", "application/json"}]
. Note: request headers are overriden by response headers when adapter is called.:body
- request/response body. Note: request body is overriden by response body when adapter is called.:status
- response status. Example:200
:opts
- list of options. Example:[adapter: [recv_timeout: 30_000]]
Link to this section Summary
Link to this section Types
Link to this type
body()
Specs
body() :: any()
Link to this type
client()
Specs
client() :: Tesla.Client.t()
Link to this type
headers()
Specs
Link to this type
method()
Specs
method() :: :head | :get | :delete | :trace | :options | :post | :put | :patch
Link to this type
opts()
Specs
opts() :: keyword()
Link to this type
param()
Specs
Link to this type
query()
Specs
Link to this type
result()
Specs
Link to this type
stack()
Specs
Link to this type
status()
Specs
status() :: integer() | nil
Specs
Link to this type
url()
Specs
url() :: binary()