Module required_header
Available on crate features
http and std only.Expand description
Middleware that fills in headers a request or response is expected to carry.
AddRequiredRequestHeaders:HostandUser-Agenton the outgoing request, typically used by http clients.AddRequiredResponseHeaders:ServerandDateon the outgoing response, typically used by http servers.
By default only missing headers are added; existing ones are left untouched unless overwriting is enabled.
Modules§
- request
- Add the
HostandUser-Agentheaders to a request, if they are missing. - response
- Add the
ServerandDateheaders to a response, if they are missing.
Structs§
- AddRequired
Request Headers - Middleware that adds the
HostandUser-Agentheaders to a request before passing it to the inner service. - AddRequired
Request Headers Layer Layerthat wraps a service inAddRequiredRequestHeaders.- AddRequired
Response Headers - Middleware that adds the
ServerandDateheaders to the response returned by the inner service. - AddRequired
Response Headers Layer Layerthat wraps a service inAddRequiredResponseHeaders.