http-client icon indicating copy to clipboard operation
http-client copied to clipboard

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

Open GromNaN opened this issue 1 year ago • 5 comments

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:

GromNaN avatar Oct 22 '22 21:10 GromNaN

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

Bilge avatar Oct 22 '22 23:10 Bilge

That's a matter of adoption. Once major sdks will use this interface instead of requiring guzzle or symfony http-client directly (see https://github.com/FriendsOfPHP/well-known-implementations/issues/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.

GromNaN avatar Oct 23 '22 19:10 GromNaN

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

kelunik avatar Oct 24 '22 07:10 kelunik

I guess this can be closed?

nicolas-grekas avatar May 05 '23 12:05 nicolas-grekas

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

kelunik avatar May 05 '23 13:05 kelunik