-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Document Symfony HttpClient #349
Comments
Looks like it does provide http-client-implementation: And https://github.com/Nyholm/psr7 looks neat. But we would need to test it to be sure. |
The Symfony HttpClient is async by default, and implements HttpPlug Promises, perhaps it is a solution for #323 . |
We still need async support in Graby itself, which is what #323 attempts to do. Unfortunately, the HttpPlug promises had limitations that blocked this. Not sure if anything changed. |
I'm far from an expert on this, but I think HttpPlug can be dropped in favor of https://github.com/Nyholm/psr7, as HttpPlug was written before some of the PSR's. But it's like going down a rabbit hole to start reading about how to set up contracts and adapters. Maybe in a new version. |
Nyholm/psr7 is just one implementation of PSR-7. PSR-7 defines interfaces for HTTP messages. We need to target PSR-7 itself to be able to use other implementations. HttpPlug is still needed because it is the closest thing to PSR-18 for async HTTP clients. Some parts of HTTPlug were already superseded by PSR-7 and PSR-18 and HTTPlug switched to them in those places. |
Since the http client is decoupled, this should install with the Symfony HttpClient. If this is correct, can it be added to the docs?
composer require 'j0k3r/graby dev-master' symfony/http-client nyholm/psr7:^1.0
The text was updated successfully, but these errors were encountered: