You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=>WriteErrorResponseAsync(context,$"Invalid 'Content-Type' header: value '{context.Request.ContentType}' could not be parsed.",HttpStatusCode.UnsupportedMediaType);
=>WriteErrorResponseAsync(context,$"Invalid 'Content-Type' header: non-supported media type '{context.Request.ContentType}'. Must be of '{MediaType.JSON}', '{MediaType.GRAPH_QL}' or '{MediaType.FORM}'. {DOCS_URL}",HttpStatusCode.UnsupportedMediaType);
Copy file name to clipboardExpand all lines: tests/Samples.Server.Tests/ResponseTests.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ public async Task Wrong_Query_Should_Return_Error(HttpMethod httpMethod, HttpCon
95
95
HttpMethod.Post,
96
96
newStringContent(Serializer.ToJson(newGraphQLRequest{Query="query { __schema { queryType { name } } }"}),Encoding.UTF8,"something/unknown"),
97
97
HttpStatusCode.UnsupportedMediaType,
98
-
"Invalid 'Content-Type' header: non-supported media type. Must be of 'application/json', 'application/graphql' or 'application/x-www-form-urlencoded'. See: http://graphql.org/learn/serving-over-http/."
98
+
"Invalid 'Content-Type' header: non-supported media type 'something/unknown; charset=utf-8'. Must be of 'application/json', 'application/graphql' or 'application/x-www-form-urlencoded'. See: http://graphql.org/learn/serving-over-http/."
99
99
},
100
100
101
101
// POST with JSON mime type that doesn't start with an object or array token should be a bad request
0 commit comments