Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9143a0

Browse files
authored
use preferred mime-type (#1714)
1 parent6eba45b commita9143a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎integrations/actix-web/src/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl Responder for GraphQLResponse {
216216
},
217217
),
218218
_ =>(
219-
"application/json",
219+
"application/graphql-response+json",
220220
match serde_json::to_vec(&self.0){
221221
Ok(body) => body,
222222
Err(e) =>returnHttpResponse::from_error(JsonPayloadError::Serialize(e)),

‎integrations/axum/src/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl IntoResponse for GraphQLResponse {
2929
letmut resp =Response::new(body);
3030
resp.headers_mut().insert(
3131
http::header::CONTENT_TYPE,
32-
HeaderValue::from_static("application/json"),
32+
HeaderValue::from_static("application/graphql-response+json"),
3333
);
3434
ifself.0.is_ok(){
3535
ifletSome(cache_control) =self.0.cache_control().value(){

‎src/http/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub async fn receive_batch_body(
9797
let content_type = content_type
9898
.as_ref()
9999
.map(AsRef::as_ref)
100-
.unwrap_or("application/json");
100+
.unwrap_or("application/graphql-response+json");
101101

102102
let content_type: mime::Mime = content_type.parse()?;
103103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp