8000 Adapted the HTTPlug integration docs to Async Client by Nyholm · Pull Request #12389 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Adapted the HTTPlug integration docs to Async Client #12389

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

Merged
merged 2 commits into from
Nov 1, 2019
Merged
Changes from 1 commit
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
Next Next commit
Adapted the HTTPlug integration docs to Async Client
  • Loading branch information
Nyholm authored and nicolas-grekas committed Oct 14, 2019
commit 7295404f84f9fe5c0bc156411cd74dde71753e4a
13 changes: 4 additions & 9 deletions components/http_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,15 @@ HTTPlug
The `HTTPlug`_ specification was published before PSR-18 and is superseded by
it. As such, you should not use it in newly written code. Yet, many libraries
still require v1 or v2 of it. The component is interoperable with them thanks to
the ``HttplugClient`` adapter class. Similarly to ``Psr18Client`` implementing
relevant parts of PSR-17, ``HttplugClient`` also implements the factory methods
defined in the related ``php-http/message-factory`` package.

Internally, the implementation relies on the ``Psr18Client``, so that the
``psr/http-client`` package is needed to use this class:
the :class:`Symfony\\Component\\HttpClient\\HttplugClient` adapter class. Similarly
to ``Psr18Client`` implementing relevant parts of PSR-17, ``HttplugClient`` also
implements the factory methods defined in the related ``php-http/message-factory``
package.

.. code-block:: terminal

# Let's suppose php-http/httplug is already required by the lib you want to use

# installs the PSR-18 ClientInterface
$ composer require psr/http-client

# installs an efficient implementation of response and stream factories
# with autowiring aliases provided by Symfony Flex
$ composer require nyholm/psr7
Expand Down
0