Skip to content

Repository files navigation

Latest Stable VersionTotal DownloadsLicensePHP

webclient/ext-protocol-version

Auto change protocol version extension for PSR-18 HTTP client.

Install

Install this package and your favorite psr-18 implementation.

composer require webclient/ext-protocol-version:^2.0

Using

<?phpuseWebclient\Extension\ProtocolVersion\ProtocolClientDecorator;
usePsr\Http\Client\ClientInterface;
usePsr\Http\Message\RequestInterface;
/**  * @var ClientInterface $client Your PSR-18 HTTP Client */$http = newProtocolClientDecorator($client);
/** @var RequestInterface $request */$response = $http->sendRequest($request);

If server returns a 505 error, this client will repeat the request with the protocol version specified in the server response.

About

Auto change protocol version extension for PSR-18 HTTP client

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages