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

README/Composer: suggest the Requests PSR18 adapter package #827

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,24 @@ set of tests. We're not quite there yet, but [we're getting close][codecov].
[codecov]: https://codecov.io/github/WordPress/Requests/


Requests and PSR-7/PSR-18
-------------------------

[PSR-7][psr-7] describes common interfaces for representing HTTP messages.
[PSR-18][psr-18] describes a common interface for sending HTTP requests and receiving HTTP responses.

Both PSR-7 as well as PSR-18 were created after Requests' conception.
At this time, there is no intention to add a native PSR-7/PSR-18 implementation to the Requests library.

However, the amazing [Artur Weigandt][art4] has created a [package][requests-psr-18], which allows you to use Requests as a PSR-7 compatible PSR-18 HTTP Client.
schlessera marked this conversation as resolved.
Show resolved Hide resolved
If you are interested in a PSR-7/PSR-18 compatible version of Requests, we highly recommend you check out [this package][requests-psr-18].

[psr-7]: https://www.php-fig.org/psr/psr-7/
[psr-18]: https://www.php-fig.org/psr/psr-18/
[art4]: https://github.com/Art4
[requests-psr-18]: https://packagist.org/packages/art4/requests-psr18-adapter


Contribute
----------

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"suggest": {
"ext-curl": "For improved performance",
"ext-openssl": "For secure transport support",
"ext-zlib": "For improved performance when decompressing encoded streams"
"ext-zlib": "For improved performance when decompressing encoded streams",
"art4/requests-psr18-adapter": "For using Requests as a PSR-18 HTTP Client"
},
"autoload": {
"psr-4": {
Expand Down