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); }