Skip to content

Commit 8eafe2e

Browse files
committed
Merge pull request #40 from njam/issue-40
Force "object"-form when posting json
2 parents 340ad2f + 85c2994 commit 8eafe2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Github/HttpClient/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function request($path, array $parameters = array(), $httpMethod = 'GET',
168168
$request = $this->createRequest($httpMethod, $path);
169169
$request->addHeaders($headers);
170170
if (count($parameters) > 0) {
171-
$request->setContent(json_encode($parameters));
171+
$request->setContent(json_encode($parameters, JSON_FORCE_OBJECT));
172172
}
173173

174174
$hasListeners = 0 < count($this->listeners);

0 commit comments

Comments
 (0)