ExAcme.Request (ExAcme v0.3.0)
View SourceProvides functions to build and manage HTTP requests for the ACME API.
Summary
Functions
Builds a fetch request with the given URL.
Builds a named request by looking up the URL based on the given name and client.
Builds an update request with the given URL and body.
Looks up the URL associated with a given name from the client's directory.
Types
Functions
Builds a fetch request with the given URL.
Parameters
url
: The URL to fetch.
Returns
- A request struct with the specified URL and an empty body.
@spec build_named(String.t(), body(), ExAcme.client()) :: t()
Builds a named request by looking up the URL based on the given name and client.
Parameters
name
: The name identifier for the request URL.body
: The content of the request body.client
: The client used to fetch the directory information.
Returns
- A request struct with the looked-up URL and specified body.
Builds an update request with the given URL and body.
Parameters
url
: The URL to send the update to.body
: The content of the request body.
Returns
- A request struct with the specified URL and body.
@spec lookup_named_url(String.t(), ExAcme.client()) :: String.t()
Looks up the URL associated with a given name from the client's directory.
Parameters
name
: The name identifier for the request URL.client
: The client used to fetch the directory information.
Returns
- The URL associated with the given name in the directory.