Module http

Module http 

Source

Re-exports§

pub use client::clients_reqwest::ReqwestClient;
pub use client::clients_reqwest::ReqwestClientLeastLoaded;
pub use client::clients_reqwest::ReqwestClientRoundRobin;
pub use server::Server;
pub use server::ServerBuilder;

Modules§

body
cache
client
dns
headers
middleware
proxy
server
shed

Enums§

UrlToUriError
Error that might happen during Url to Uri conversion

Functions§

calc_headers_size
Calculate very approximate HTTP request/response headers size in bytes. More or less accurate only for http/1.1 since in h2 headers are in HPACK-compressed. But it seems there’s no better way.
extract_authority
Attempts to extract host from X-Forwarded-Host header, HTTP2 “authority” pseudo-header or from HTTP/1.1 Host header (in this order of preference)
extract_host
Attempts to extract “host” from “host:port” format. Host can be either FQDN or IPv4/IPv6 address.
http_method
Get a static string representing given HTTP method
http_version
Get a static string representing given HTTP version
redirect_to_https
Redirects any request to an HTTPS scheme
url_to_uri
Converts Url to Uri