Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ][php] Allow consumers to configure http version #9119

Open
arrilot opened this issue Mar 28, 2021 · 0 comments
Open

[REQ][php] Allow consumers to configure http version #9119

arrilot opened this issue Mar 28, 2021 · 0 comments

Comments

@arrilot
Copy link

arrilot commented Mar 28, 2021

Is your feature request related to a problem? Please describe.

There is no way to turn on http/2 in php client without messing with templates atm

Guzzle supports it like this:

use GuzzleHttp\Client;

$client = new Client();
$client->get('https://google.com/', [
    'version' => 2.0,
    'debug' => true,
]);

Describe the solution you'd like

It looks like a good idea to extend Configuration.php with httpVersion/getHttpVersion/setHttpVersion.
If it's expicitly set by the client consumer, than we can use it in createHttpClientOptions and call it a day

Describe alternatives you've considered

We can also just set version 2.0 by default, but this will probably lead to lots of problems since http/2 support in Guzzle is far from being ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant