diff --git a/src/Adapter/Guzzle.php b/src/Adapter/Guzzle.php index 874f3fe..c9ac7cf 100644 --- a/src/Adapter/Guzzle.php +++ b/src/Adapter/Guzzle.php @@ -50,7 +50,7 @@ class Guzzle implements Adapter { $response = $this->client->post($uri, [ 'headers' => $headers, - 'form_params' => $body + 'json' => $body ] ); @@ -125,4 +125,4 @@ class Guzzle implements Adapter throw new ResponseException("Request was unsuccessful."); } } -} \ No newline at end of file +} diff --git a/tests/Adapter/GuzzleTest.php b/tests/Adapter/GuzzleTest.php index 5049215..3d1e27a 100644 --- a/tests/Adapter/GuzzleTest.php +++ b/tests/Adapter/GuzzleTest.php @@ -47,7 +47,7 @@ class GuzzleTest extends PHPUnit_Framework_TestCase $this->assertEquals("application/json", $headers["Content-Type"][0]); $body = json_decode($response->getBody()); - $this->assertEquals("Testing a POST request.", $body->form->{"X-Post-Test"}); + $this->assertEquals("Testing a POST request.", $body->json->{"X-Post-Test"}); } public function testPut()