NuonAPI.Connection (nuon v0.19.90)
Handle Tesla connections for NuonAPI.
Additional middleware can be set in the compile-time or runtime configuration:
config :tesla, NuonAPI.Connection,
base_url: "https://ctl.prod.nuon.co",
adapter: Tesla.Adapter.Hackney
The default base URL can also be set as:
config :nuon_api,
:base_url, "https://ctl.prod.nuon.co"
Summary
Functions
Returns the default adapter for this API.
Returns fully configured middleware for passing to Tesla.client/2.
Configure a client with no authentication.
Configure a client that may have authentication.
Forward requests to Tesla.
Types
Link to this type
options()
The list of options that can be passed to new/1.
base_url
: Overrides the base URL on a per-client basis.user_agent
: Overrides the User-Agent header.
Functions
Link to this function
adapter()
Returns the default adapter for this API.
Link to this function
middleware(options \\ [])
@spec middleware(options()) :: [Tesla.Client.middleware()]
Returns fully configured middleware for passing to Tesla.client/2.
Link to this function
new()
@spec new() :: Tesla.Env.client()
Configure a client with no authentication.
Returns
Tesla.Env.client
Link to this function
new(options)
@spec new(options()) :: Tesla.Env.client()
Configure a client that may have authentication.
Parameters
options
: a keyword list of OpenAPIPetstore.Connection.options.
Returns
Tesla.Env.client
Link to this function
request(client, options)
@spec request(Tesla.Client.t(), [Tesla.option()]) :: Tesla.Env.result()
Forward requests to Tesla.