We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9dcf45 commit 2c99d4eCopy full SHA for 2c99d4e
src/header/common/content_type.rs
@@ -53,6 +53,11 @@ impl ContentType {
53
ContentType(mime!(Text/Html; Charset=Utf8))
54
}
55
56
+ /// A constructor to easily create a `Content-Type: application/www-form-url-encoded` header.
57
+ #[inline]
58
+ pub fn form_url_encoded() -> ContentType {
59
+ ContentType(mime!(Application/WwwFormUrlEncoded))
60
+ }
61
/// A constructor to easily create a `Content-Type: image/jpeg` header.
62
#[inline]
63
pub fn jpeg() -> ContentType {
@@ -65,4 +70,5 @@ impl ContentType {
65
70
ContentType(mime!(Image/Png))
66
71
67
72
73
+
68
74
bench_header!(bench, ContentType, { vec![b"application/json; charset=utf-8".to_vec()] });
0 commit comments