Merge pull request #2 from hans00/master

Use correct format to post data.
This commit is contained in:
Junade
2017-08-30 18:48:07 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -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.");
}
}
}
}

View File

@@ -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()