http-client-contracts
HTTPlug
http-client-contracts | HTTPlug | |
---|---|---|
1 | 1 | |
1,881 | 2,541 | |
0.9% | 0.4% | |
4.7 | 3.9 | |
14 days ago | 2 months ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
http-client-contracts
-
A minimal library that defines primitive building blocks of PHP code.
I have to disagree. To me, declaring a method via the @method tag (in rare cases) is equivalent to actually declaring it in a class/interface. Due to PHP limitations, the obvious lack of generics, and what I wrote earlier, I simply couldn't do it any other way. Take eg. HttpClientInterface from symfony/http-client-contracts or InputInterface from symfony/console, they had different reasons but the outcome is the same.
HTTPlug
-
API Client Design Across Languages - Part 2 - Making Requests
Like Node.js, the PHP ecosystem has quite a number of good HTTP request libraries. Guzzle is perhaps one of the most well known, but there are many other popular libraries out there. Luckily, PHP also has some interface standards around HTTP clients and messages, particularly PSR-7, PSR-17, and PSR-18,
What are some alternatives?
console - Eases the creation of beautiful and testable command line interfaces
Guzzle - Guzzle, an extensible PHP HTTP client
http-client - Provides powerful methods to fetch HTTP resources synchronously or asynchronously
Buzz - PHP's lightweight HTTP client
PHP VCR - Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
Requests - Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
Retrofit - Retrofit implementation in PHP. A REST client for PHP.
common - A minimal library that defines primitive building blocks of PHP code.
http-client - An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.
guzzler - Supercharge your app or SDK with a testing library specifically for Guzzle
HTTPFul - A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.