amphp / http-client

An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.

Home Page:https://amphp.org/http-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

GromNaN opened this issue · 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:

commented

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

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.

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

I guess this can be closed?

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