From fe23bb59160ac992ce125f1cc40cc7c2627921a3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2018 17:11:59 +0100 Subject: [PATCH] adjust post body for new guzzle Signed-off-by: Robin Appelman --- lib/private/Http/Client/Client.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index e853099e67..0387fcabfa 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); }