diff options
author | Robin Appelman <robin@icewind.nl> | 2018-02-09 17:11:59 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-02-09 17:13:33 +0100 |
commit | fe23bb59160ac992ce125f1cc40cc7c2627921a3 (patch) | |
tree | 9b94c1ba43b7ba4f45e6c94e0cc8fc5ac8eeaf7f /lib/private/Http/Client/Client.php | |
parent | 359ccbc023ce134c828a620fb6f7e70e886e5e44 (diff) | |
download | nextcloud-server-fe23bb59160ac992ce125f1cc40cc7c2627921a3.tar.gz nextcloud-server-fe23bb59160ac992ce125f1cc40cc7c2627921a3.zip |
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.php | 4 |
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); } |