Skip to content

Conversation

@nicolas-grekas
Copy link
Collaborator

@nicolas-grekas nicolas-grekas commented Apr 26, 2023

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets -
Documentation -
License MIT

Psr18Client extends Psr17Client so that this dramatically cuts the boilerplate to make an HTTP request:

use Http\Discovery\Psr18Client;

$client = new Psr18Client();
$request = $client->createRequest('GET', 'https://example.com/');
$response = $client->sendRequest($request);

Internally, this code reuses whatever PSR-7, PSR-17 and PSR-18 implementations are installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant