facquest
Types
pub type FacquestError =
core.FacquestError
pub type FacquestResponse(a) =
core.FacquestResponse(a)
pub type ResultResponse(a) =
core.ResultResponse(a)
Constants
pub const default_timeout: Option(Int) = Some(15_000)
Functions
pub fn delete(
client client: Client,
path path: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
pub fn extract_headers(
opts: List(Config),
) -> List(#(String, String))
pub fn get(
client client: Client,
path path: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
pub fn merge_opts(
client: Client,
opts: List(Config),
) -> List(Config)
This is used internally to merge the client options with the request options, it is only exposed for testing purposes
pub fn new(
base_url base_url: Url,
headers headers: List(#(String, String)),
timeout timeout: Option(Int),
) -> Client
pub fn patch(
client client: Client,
path path: String,
body body: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
pub fn post(
client client: Client,
path path: String,
body body: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
pub fn put(
client client: Client,
path path: String,
body body: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
pub fn send(
client client: Client,
method method: Method,
path path: String,
expecting target: Target(a),
options opts: List(Config),
) -> Result(FacquestResponse(a), FacquestError)
A way to send a request with a client, you would normally want to use the convenience functions (get, post, put, patch, delete) instead