Skip to content

Commit 1a35310

Browse files
committed
feat(headers): add ContentType::octet_stream() constructor
1 parent 1e04ccd commit 1a35310

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/header/common/content_type.rs

+6
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ impl ContentType {
9595
pub fn png() -> ContentType {
9696
ContentType(mime!(Image/Png))
9797
}
98+
99+
/// A constructor to easily create a `Content-Type: application/octet-stream` header.
100+
#[inline]
101+
pub fn octet_stream() -> ContentType {
102+
ContentType(mime!(Application/OctetStream))
103+
}
98104
}
99105

100106
impl Eq for ContentType {}

0 commit comments

Comments
 (0)