mirror of https://github.com/fafhrd91/actix-web
Add `html_utf8` content type.
This commit is contained in:
parent
d40b6748bc
commit
4243f6ef43
|
@ -80,6 +80,13 @@ impl ContentType {
|
||||||
ContentType(mime::TEXT_HTML)
|
ContentType(mime::TEXT_HTML)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A constructor to easily create a `Content-Type: text/html; charset=utf-8`
|
||||||
|
/// header.
|
||||||
|
#[inline]
|
||||||
|
pub fn html_utf8() -> ContentType {
|
||||||
|
ContentType(mime::TEXT_HTML_UTF_8)
|
||||||
|
}
|
||||||
|
|
||||||
/// A constructor to easily create a `Content-Type: text/xml` header.
|
/// A constructor to easily create a `Content-Type: text/xml` header.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn xml() -> ContentType {
|
pub fn xml() -> ContentType {
|
||||||
|
|
Loading…
Reference in New Issue