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

Commit 2989d36

Browse files
Merge pull request #342 from phpclassic/tareqtms-patch-2
Content type application/graphql is deprecated
2 parents ffce666 + 0a2e1a8 commit 2989d36

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎lib/HttpRequestGraphQL.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ protected static function prepareRequest($httpHeaders = array(), $data = array()
4545
}
4646

4747
self::$httpHeaders = $httpHeaders;
48+
self::$httpHeaders['Content-type'] = 'application/json';
4849

4950
if (is_array($variables)) {
5051
self::$postDataGraphQL = json_encode(['query' => $data, 'variables' => $variables]);
51-
self::$httpHeaders['Content-type'] = 'application/json';
52-
} else {
53-
self::$httpHeaders['Content-type'] = 'application/graphql';
5452
}
5553
}
5654

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /