malomo v0.0.9 Malomo.HTTP behaviour
Behaviour for implementing an HTTP client.
Link to this section Summary
Link to this section Types
Link to this type
response_t()
response_t() :: %{
body: String.t(),
headers: Malomo.http_headers_t(),
status_code: pos_integer()
}
Link to this section Callbacks
Link to this callback
request(method, url, headers, body, opts)
request( method :: Malomo.http_method_t(), url :: String.t(), headers :: Malomo.http_headers_t(), body :: String.t(), opts :: any() ) :: {:ok, response :: response_t()} | {:error, reason :: any()}