We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77bfcd9 commit 92595e8Copy full SHA for 92595e8
src/header/common/content_type.rs
@@ -68,12 +68,18 @@ impl ContentType {
68
ContentType(mime::TEXT_PLAIN_UTF_8)
69
}
70
71
- /// A constructor to easily create a `Content-Type: text/html; charset=utf-8` header.
+ /// A constructor to easily create a `Content-Type: text/html` header.
72
#[inline]
73
pub fn html() -> ContentType {
74
ContentType(mime::TEXT_HTML)
75
76
77
+ /// A constructor to easily create a `Content-Type: text/xml` header.
78
+ #[inline]
79
+ pub fn xml() -> ContentType {
80
+ ContentType(mime::TEXT_XML)
81
+ }
82
+
83
/// A constructor to easily create a `Content-Type: application/www-form-url-encoded` header.
84
85
pub fn form_url_encoded() -> ContentType {
0 commit comments