Simple http(1/2) client only depends-on mint package in passive mode like finch package!
- mainly used in script
Example
eg. M.get :x
Todo
- support request_timeout as total like finch
- http2 not work with proxy??? If both :http1 and :http2 are present in the list passed in the :protocols option, the protocol negotiation happens in the following way:
- json coding
Options
- method
- headers
- body
proxy fale|:no | true(default)
debug | verbose: boolean()
- receive_timeout
- connect_opts https://hexdocs.pm/mint/1.7.1/Mint.HTTP.html#connect/4-options
Links
Summary
Functions
delete request
get request
head request
post request
Base request method
Options
- debug
- method
- headers %{"header_name1" => ["value1"]}
- body in string
timing
- other channel-specific options
About response
- is map todo typespec
- body: should be binary
- headers: %{"header_name1" => ["value1"]}
- header name should in lowercase string
- value in a list