Skip to content

Commit

Permalink
Merge pull request #789 from UN-OCHA/berliner/graphql-update
Browse files Browse the repository at this point in the history
Update headers for graphql requests
  • Loading branch information
berliner authored Nov 9, 2023
2 parents f56d73a + f1ab5c6 commit 3952138
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public function searchArticlesByTitle($title) {
public function query($payload) {
$body = '{"query": "query ' . str_replace("\n", " ", addslashes(trim($payload))) . '"}';
$headers = [
'Content-type: application/json',
'Content-type' => 'application/json',
'Apollo-Require-Preflight' => 'true',
];
if ($basic_auth = $this->getRemoteBasicAuth()) {
$headers['Authorization'] = 'Basic ' . base64_encode($basic_auth['user'] . ':' . $basic_auth['pass']);
Expand Down

0 comments on commit 3952138

Please sign in to comment.