mirror of
https://github.com/ovh/php-ovh.git
synced 2023-11-05 03:20:26 +01:00
Add content from QueryString to build valide signature
Signed-off-by: Adrien Bensaibi <adrien.bensaibi@corp.ovh.com>
This commit is contained in:
parent
b472ebdec1
commit
727249f738
@ -232,7 +232,8 @@ class Api
|
||||
$query = array_merge($query, (array)$content);
|
||||
$query = \GuzzleHttp\Psr7\build_query($query);
|
||||
|
||||
$request = $request->withUri($request->getUri()->withQuery($query));
|
||||
$url = $request->getUri()->withQuery($query);
|
||||
$request = $request->withUri($url);
|
||||
$body = "";
|
||||
} elseif (isset($content)) {
|
||||
$body = json_encode($content);
|
||||
|
@ -242,4 +242,12 @@ class ApiFunctionalTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->api->get('/me/accessRestriction/ip', ['foo' => 'bar']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Api::get, should build valide signature
|
||||
*/
|
||||
public function testApiGetWithQueryString()
|
||||
{
|
||||
$this->api->get('/me/api/credential', ['status' => 'pendingValidation']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user