true), do not try to automatically authenticate the client if a 401 (Unauthorized) status code is received.
- Send authorization. See also http_set_authorization/2.
- basic(+User, +Password)
- HTTP Basic authentication.
- HTTP Bearer authentication.
- digest(+User, +Password)
- HTTP Digest authentication. This option is only provided if the plugin
library(http/http_digest)is also loaded.
- Connect to the given Unix domain socket. In this scenario the host name
and port or ignored. If the server replies with a redirect
message and the host differs from the original host as normal TCP
connection is used to handle the redirect. This option is inspired by
- Specify the
Connectionheader. Default is
close. The alternative is
Keep-alive. This maintains a pool of available connections as determined by keep_connection/1. The
Keep-alive, Upgrade. Keep-alive connections can be closed explicitly using http_close_keep_alive/1. Keep-alive connections may significantly improve repetitive requests on the same server, especially if the IP route is long, HTTPS is used or the connection uses a proxy.
- Unify FinalURL with the final destination. This differs from the original URL if the returned head of the original indicates an HTTP redirect (codes 301, 302 or 303). Without a redirect, FinalURL is the same as URL if URL is an atom, or a URL constructed from the parts.
- header(Name, -AtomValue)
- If provided, AtomValue is unified with the value of the indicated field in the reply header. Name is matched case-insensitive and the underscore (_) matches the hyphen (-). Multiple of these options may be provided to extract multiple header fields. If the header is not available AtomValue is unified to the empty atom ('').
- If provided, List is unified with a list of Name(Value) pairs
corresponding to fields in the reply header. Name and Value follow the
same conventions used by the
header(Name,Value)option. See also
raw_headers(-List)which provides the entire HTTP reply header in unparsed representation.
- One of
headmessage can be used in combination with the
header(Name, Value)option to access information on the resource without actually fetching the resource itself. The returned stream must be closed immediately.
post(Data)is provided, the default is
- Size is unified with the integer value of
Content-Lengthin the reply header.
- Version is a pair
Major-Minor, where Major and Minor are integers representing the HTTP version in the reply header.
- Ask for partial content. Range is a term Unit(From,To),
where From is an integer and To is either an
integer or the atom
end. HTTP 1.1 only supports Unit =
bytes. E.g., to ask for bytes 1000-1999, use the option
- Do not install a decoding filter for Encoding. For example,
raw_encoding('applocation/gzip')the system will not decompress the stream if it is compressed using