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

chartmogul api does not support http2 requests #72

Open
AidasK opened this issue Feb 12, 2021 · 3 comments
Open

chartmogul api does not support http2 requests #72

AidasK opened this issue Feb 12, 2021 · 3 comments

Comments

@AidasK
Copy link

AidasK commented Feb 12, 2021

Working example

curl -X POST "https://api.chartmogul.com/v1/data_sources" -v --http1.1 \
     -u xxxxxx:xxxxxx \
     -H "Content-Type: application/json" \
     -d '{
          "name": "In-house billing"
         }'

Not working example (if we assume that you are using latest OSx version or latest linux distro):

curl -X POST "https://api.chartmogul.com/v1/data_sources" -v \
     -u xxxxxx:xxxxxx \
     -H "Content-Type: application/json" \
     -d '{
          "name": "In-house billing"
         }'

Same with this lib, it tries to use http2 connection instead of http1.1 and every POST request fails. GET requests works as expected.

@pkopac
Copy link
Contributor

pkopac commented Feb 12, 2021

@AidasK thank you for your example, please use the workaround with HTTP 1.1 for now. We're working on upgrading, but it will take a few months. But it's a good point, I'll check if we can at least document it or configure it to use HTTP 1.1 for now.

@AidasK
Copy link
Author

AidasK commented Feb 12, 2021

My workaround was to manually install and bypass new \Http\Adapter\Guzzle6\Client(); which uses http1.1 by default

@gjuric
Copy link
Contributor

gjuric commented Feb 19, 2021

I am affected by this as well since trying to upgrade to v3. The big issue is that this does not happen when you try to do a GET request but only when posting so the error was caught in production.

It's nice that it's possible to inject your own HTTP Client and I can confirm that this works, but it's pretty cumbersome to track all the static calls to different options and inject the client (see #73 as well).

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

No branches or pull requests

3 participants