diff --git a/src/common/content_encoding.rs b/src/common/content_encoding.rs index 444eb41c..cee95fcd 100644 --- a/src/common/content_encoding.rs +++ b/src/common/content_encoding.rs @@ -22,6 +22,7 @@ use HeaderValue; /// # Example values /// /// * `gzip` +/// * `br` /// /// # Examples /// @@ -46,6 +47,12 @@ impl ContentEncoding { ContentEncoding(HeaderValue::from_static("gzip").into()) } + /// A constructor to easily create a `Content-Encoding: br` header. + #[inline] + pub fn brotli() -> ContentEncoding { + ContentEncoding(HeaderValue::from_static("br").into()) + } + /// Check if this header contains a given "coding". /// /// This can be used with these argument types: