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

Implementing PSR-18 adapter for amphp/http-client v5 #306

Open
GromNaN opened this issue Oct 22, 2022 · 5 comments
Open

Implementing PSR-18 adapter for amphp/http-client v5 #306

GromNaN opened this issue Oct 22, 2022 · 5 comments

Comments

@GromNaN
Copy link

GromNaN commented Oct 22, 2022

Thanks to fibers, the amphp/http-client v5 has a "sync" interface: it gets rid of promises & generators. It is now possible to implement the PSR-18: HTTP Client.

Benefits:

@Bilge
Copy link
Contributor

Bilge commented Oct 22, 2022

Your link to psr/http-client-implementation doesn't work, and whom needs such a client anyway?

@GromNaN
Copy link
Author

GromNaN commented Oct 23, 2022

That's a matter of adoption. Once major sdks will use this interface instead of requiring guzzle or symfony http-client directly (see FriendsOfPHP/well-known-implementations#2), it will be possible to use them asynchronously in an AMP event-loop.

I'm opening this issue to gather feedbacks and find if there is something already existing.

@kelunik
Copy link
Member

kelunik commented Oct 24, 2022

Yes, there's https://github.com/amphp/http-client-psr7/tree/v2 already. However, the README is still old.

@kelunik kelunik added this to the External Plugin milestone May 4, 2023
@nicolas-grekas
Copy link
Contributor

I guess this can be closed?

@kelunik
Copy link
Member

kelunik commented May 5, 2023

@nicolas-grekas I think it still needs an update.

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

No branches or pull requests

4 participants