feat: default to charset=utf-8 for text content type (#554)

* feat: default to charset=utf-8 for text content type

* added changelog && fix comment

* fix workflow
This commit is contained in:
Pure White
2021-11-25 08:31:30 +00:00
committed by GitHub
parent c5a33addb7
commit 5a5800c1ae
13 changed files with 54 additions and 44 deletions
+2 -1
View File
@@ -6,9 +6,10 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
mime = "0.3"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version="0.3", features = ["env-filter"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tower-http = { version = "0.1", features = ["trace"] }
serde_json = "1.0"
hyper = { version = "0.14", features = ["full"] }
+1 -1
View File
@@ -81,7 +81,7 @@ mod tests {
Request::builder()
.method(http::Method::POST)
.uri("/json")
.header(http::header::CONTENT_TYPE, "application/json")
.header(http::header::CONTENT_TYPE, mime::APPLICATION_JSON.as_ref())
.body(Body::from(
serde_json::to_vec(&json!([1, 2, 3, 4])).unwrap(),
))