Skip to content

Commit

Permalink
Merge pull request #26 from biryukovmaxim/default-content-type
Browse files Browse the repository at this point in the history
Set content-type and charset
  • Loading branch information
Totodore authored Jun 19, 2023
2 parents aa21170 + ada077f commit 0bd8881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions engineioxide/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl<B> From<Error> for Response<ResponseBody<B>> {
let conn_err_resp = |message: &'static str| {
Response::builder()
.status(400)
.header("Content-Type", "application/json")
.body(ResponseBody::custom_response(message.into()))
.unwrap()
};
Expand Down
1 change: 1 addition & 0 deletions engineioxide/src/futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ where
{
Response::builder()
.status(code)
.header("Content-Type", "text/plain; charset=UTF-8")
.body(ResponseBody::custom_response(data.into()))
}

Expand Down

0 comments on commit 0bd8881

Please sign in to comment.