Skip to content

Commit

Permalink
[HttpClient] Fix type error with http_version 1.1
Browse files Browse the repository at this point in the history
Fix a type error by removing a nested setProtocolVersions() call in AmpHttpClient::request()
  • Loading branch information
Filnor committed Oct 6, 2023
1 parent 213e564 commit ab8446f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AmpHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function request(string $method, string $url, array $options = []): Respo
if ($options['http_version']) {
$request->setProtocolVersions(match ((float) $options['http_version']) {
1.0 => ['1.0'],
1.1 => $request->setProtocolVersions(['1.1', '1.0']),
1.1 => ['1.1', '1.0'],
default => ['2', '1.1', '1.0'],
});
}
Expand Down

0 comments on commit ab8446f

Please sign in to comment.