webclient/ext-protocol-version
Composer 安装命令:
composer require webclient/ext-protocol-version
包简介
Auto change protocol version extension for PSR-18 HTTP client
README 文档
README
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.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-11