From 82fbab46323cfa049b3d708631afe16635d30a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 7 Mar 2024 10:49:08 +0100 Subject: [PATCH] fix: Swap method and uri parameter in request to match upstream order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Http/Client/Client.php | 4 ++-- lib/public/Http/Client/IClient.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 6877018cc70..65784e6cb58 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -427,8 +427,8 @@ class Client implements IClient { /** * Sends a HTTP request * - * @param string $uri * @param string $method The HTTP method to use + * @param string $uri * @param array $options Array such as * 'query' => [ * 'field' => 'abc', @@ -454,7 +454,7 @@ class Client implements IClient { * @return IResponse * @throws \Exception If the request could not get completed */ - public function request(string $uri, string $method, array $options = []): IResponse { + public function request(string $method, string $uri, array $options = []): IResponse { $this->preventLocalAddress($uri, $options); $response = $this->client->request($method, $uri, $this->buildRequestOptions($options)); $isStream = isset($options['stream']) && $options['stream']; diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php index 7bb3c032ea0..c6b7cafe73f 100644 --- a/lib/public/Http/Client/IClient.php +++ b/lib/public/Http/Client/IClient.php @@ -219,8 +219,8 @@ interface IClient { /** * Sends a HTTP request - * @param string $uri * @param string $method The HTTP method to use + * @param string $uri * @param array $options Array such as * 'query' => [ * 'field' => 'abc', @@ -246,7 +246,7 @@ interface IClient { * @throws \Exception If the request could not get completed * @since 29.0.0 */ - public function request(string $uri, string $method, array $options = []): IResponse; + public function request(string $method, string $uri, array $options = []): IResponse; /** * Sends an asynchronous GET request