An open API service indexing awesome lists of open source software.

https://github.com/phpwebclient/ext-protocol-version

Auto change protocol version extension for PSR-18 HTTP client
https://github.com/phpwebclient/ext-protocol-version

http-protocol-manipulation http-protocol-version php php-http-client php-library

Last synced: about 1 month ago
JSON representation

Auto change protocol version extension for PSR-18 HTTP client

Awesome Lists containing this project

README

          

[![Latest Stable Version](https://img.shields.io/packagist/v/webclient/ext-protocol-version.svg?style=flat-square)](https://packagist.org/packages/webclient/ext-protocol-version)
[![Total Downloads](https://img.shields.io/packagist/dt/webclient/ext-protocol-version.svg?style=flat-square)](https://packagist.org/packages/webclient/ext-protocol-version/stats)
[![License](https://img.shields.io/packagist/l/webclient/ext-protocol-version.svg?style=flat-square)](https://github.com/phpwebclient/ext-protocol-version/blob/master/LICENSE)
[![PHP](https://img.shields.io/packagist/php-v/webclient/ext-protocol-version.svg?style=flat-square)](https://php.net)

# webclient/ext-protocol-version

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

# Install

Install this package and your favorite [psr-18 implementation](https://packagist.org/providers/psr/http-client-implementation).

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

# Using

```php
sendRequest($request);
```

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