mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-25 00:00:23 +02:00
Update readme
This commit is contained in:
+4
-1
@@ -73,7 +73,10 @@ impl IntoResponse<Body> for &'static str {
|
||||
|
||||
impl IntoResponse<Body> for String {
|
||||
fn into_response(self) -> Response<Body> {
|
||||
Response::new(Body::from(self))
|
||||
let mut res = Response::new(Body::from(self));
|
||||
res.headers_mut()
|
||||
.insert(header::CONTENT_TYPE, HeaderValue::from_static("text/plain"));
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user