finch
Finch API wrapper module.
See the Finch documentation for additional information about the functions.
Types
pub type RequestOption {
PoolTimeout(Timeout)
ReceiveTimeout(Timeout)
RequestTimeout(Timeout)
}
Constructors
-
PoolTimeout(Timeout)
-
ReceiveTimeout(Timeout)
-
RequestTimeout(Timeout)
pub type RequestOptions =
List(RequestOption)
Values
pub fn build(req: Request(String)) -> finch.Request
Build a Finch request that can be run with request/2
or stream/5
.
Note, the HTTP methods CONNECT, TRACE, and Other(String)
are not
supported, and will be converted to GET.
pub fn request(
req: Request,
name: Atom,
options opts: List(RequestOption),
) -> Result(Response(String), Exception)
Send a request using the Finch instance with the given name.
pub fn start_link(opts opts: List(InstanceOption)) -> OnStart
Start a new Finch instance with the given options.