Skip to content

Commit caeabff

Browse files
committed
Tweaks to make usable
1 parent a3e9db0 commit caeabff

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Package/Graphql.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function execute($query, array $variables = array())
3535
$path = '/graphql';
3636

3737
$headers = array(
38-
'Accept' => 'application/vnd.github.v4+json',
38+
'Accept' => 'application/vnd.github.v4+json',
39+
'Content-Type' => 'application/json',
3940
);
4041

4142
$data = array(
@@ -49,7 +50,7 @@ public function execute($query, array $variables = array())
4950

5051
// Send the request.
5152
return $this->processResponse(
52-
$this->client->post($this->fetchUrl($path), $data, $headers),
53+
$this->client->post($this->fetchUrl($path), json_encode($data), $headers),
5354
201
5455
);
5556
}

0 commit comments

Comments
 (0)