-
Notifications
You must be signed in to change notification settings - Fork 250
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
Library should uppercase HTTP method name #416
Comments
Hi The question is where the method normalization belongs. I think it would probably be best handled inside the client to handle PSR-7 implementations that don't have any validation on the method case. |
I share same opinion. I don't think there currently exist PSR-17 factory or PSR-7 request with this normalization. |
HTTP method names are case sensitive. Even though the standardized request methods are by convention uppercase, techically https://tools.ietf.org/html/rfc2616#section-5.1.1 IMO libraries should not alter user provided request methods. Instead the user should provide the correct request method. In above case the stripe library should be fixed. |
Why is Buzz doing normalization on some places, but not other places though? |
I was experimenting with using this library as http client for stripe-php, via psr18-adapter/stripe-php that I'm working on now, but had to go back to Guzzle, as Buzz is broken there. You see, stripe library defines lowercased HTTP methods names everywhere, but their servers do not accept those:
I think you might want to make this library uppercase method names as well, like other libraries do. After all, you do that in some places already
The text was updated successfully, but these errors were encountered: