Skip to content

Commit

Permalink
fix: Swap method and uri parameter in request to match upstream order
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Mar 7, 2024
1 parent 583f640 commit 9065c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/private/Http/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ public function getResponseFromThrowable(\Throwable $e): IResponse {
/**
* 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',
Expand All @@ -454,7 +454,7 @@ public function getResponseFromThrowable(\Throwable $e): IResponse {
* @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'];
Expand Down
4 changes: 2 additions & 2 deletions lib/public/Http/Client/IClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public function getResponseFromThrowable(\Throwable $e): IResponse;

/**
* 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',
Expand All @@ -246,7 +246,7 @@ public function getResponseFromThrowable(\Throwable $e): IResponse;
* @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
Expand Down

0 comments on commit 9065c29

Please sign in to comment.