Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-02-09 19:11:59 +0300
committerRobin Appelman <robin@icewind.nl>2018-02-09 19:13:33 +0300
commitfe23bb59160ac992ce125f1cc40cc7c2627921a3 (patch)
tree9b94c1ba43b7ba4f45e6c94e0cc8fc5ac8eeaf7f /lib/private/Http/Client/Client.php
parent359ccbc023ce134c828a620fb6f7e70e886e5e44 (diff)
adjust post body for new guzzle
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Http/Client/Client.php')
-rw-r--r--lib/private/Http/Client/Client.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index e853099e67f..0387fcabfaf 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -224,6 +224,10 @@ class Client implements IClient {
*/
public function post(string $uri, array $options = []): IResponse {
$this->setDefaultOptions();
+ if (isset($options['body']) && is_array($options['body'])) {
+ $options['form_params'] = $options['body'];
+ unset($options['body']);
+ }
$response = $this->client->request('post', $uri, array_merge($options, $this->getRequestOptions()));
return new Response($response);
}