diff --git a/engineioxide/src/errors.rs b/engineioxide/src/errors.rs index bac50906..5e307019 100644 --- a/engineioxide/src/errors.rs +++ b/engineioxide/src/errors.rs @@ -58,6 +58,7 @@ impl From for Response> { let conn_err_resp = |message: &'static str| { Response::builder() .status(400) + .header("Content-Type", "application/json") .body(ResponseBody::custom_response(message.into())) .unwrap() }; diff --git a/engineioxide/src/futures.rs b/engineioxide/src/futures.rs index 8cd9cb09..17e13492 100644 --- a/engineioxide/src/futures.rs +++ b/engineioxide/src/futures.rs @@ -24,6 +24,7 @@ where { Response::builder() .status(code) + .header("Content-Type", "text/plain; charset=UTF-8") .body(ResponseBody::custom_response(data.into())) }