Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

phpwebclient/ext-protocol-version

Repository files navigation

Latest Stable Version Total Downloads License PHP

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

<?php
use Webclient\Extension\ProtocolVersion\ProtocolClientDecorator;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
/** 
 * @var ClientInterface $client Your PSR-18 HTTP Client
 */
$http = new ProtocolClientDecorator($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

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Languages

AltStyle によって変換されたページ (->オリジナル) /