Skip to content

Commit

Permalink
feat(headers): add ContentType::octet_stream() constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
taku0 committed May 3, 2017
1 parent 1e04ccd commit 1a35310
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/header/common/content_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ impl ContentType {
pub fn png() -> ContentType {
ContentType(mime!(Image/Png))
}

/// A constructor to easily create a `Content-Type: application/octet-stream` header.
#[inline]
pub fn octet_stream() -> ContentType {
ContentType(mime!(Application/OctetStream))
}
}

impl Eq for ContentType {}
Expand Down

0 comments on commit 1a35310

Please sign in to comment.