mirror of https://github.com/fafhrd91/actix-web
Update the existing `html` method.
This commit is contained in:
parent
e591881b4c
commit
630e0b1b8e
|
@ -1,8 +1,8 @@
|
|||
# Changes
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
### Added
|
||||
* `ContentType::html_utf8`, a constructor to easily create a `Content-Type: text/html; charset=utf-8` header;
|
||||
### Changed
|
||||
* `ContentType::html` now returns `Content-Type: text/html; charset=utf-8` instead of `Content-Type: text/html`.
|
||||
|
||||
|
||||
## 4.0.0-beta.10 - 2021-10-20
|
||||
|
|
|
@ -74,16 +74,10 @@ impl ContentType {
|
|||
ContentType(mime::TEXT_PLAIN_UTF_8)
|
||||
}
|
||||
|
||||
/// A constructor to easily create a `Content-Type: text/html` header.
|
||||
#[inline]
|
||||
pub fn html() -> ContentType {
|
||||
ContentType(mime::TEXT_HTML)
|
||||
}
|
||||
|
||||
/// A constructor to easily create a `Content-Type: text/html; charset=utf-8`
|
||||
/// header.
|
||||
#[inline]
|
||||
pub fn html_utf8() -> ContentType {
|
||||
pub fn html() -> ContentType {
|
||||
ContentType(mime::TEXT_HTML_UTF_8)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue