MCPcopy Create free account
hub / github.com/HFQR/xitca-web / as_header_value

Method as_header_value

http-encoding/src/coding.rs:29–37  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

27
28impl ContentEncoding {
29 pub const fn as_header_value(&self) -> HeaderValue {
30 match self {
31 Self::Br => HeaderValue::from_static("br"),
32 Self::Deflate => HeaderValue::from_static("deflate"),
33 Self::Gzip => HeaderValue::from_static("gzip"),
34 Self::Zstd => HeaderValue::from_static("zstd"),
35 Self::Identity => HeaderValue::from_static("identity"),
36 }
37 }
38
39 /// Negotiate content encoding from the `accept-encoding` header.
40 ///

Callers 3

prepare_codecMethod · 0.80
update_headerMethod · 0.80
into_responseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected