├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json └── src ├── ClientExceptionInterface.php ├── ClientInterface.php ├── NetworkExceptionInterface.php └── RequestExceptionInterface.php /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release. 4 | 5 | ## 1.0.3 6 | 7 | Add `source` link in composer.json. No code changes. 8 | 9 | ## 1.0.2 10 | 11 | Allow PSR-7 (psr/http-message) 2.0. No code changes. 12 | 13 | ## 1.0.1 14 | 15 | Allow installation with PHP 8. No code changes. 16 | 17 | ## 1.0.0 18 | 19 | First stable release. No changes since 0.3.0. 20 | 21 | ## 0.3.0 22 | 23 | Added Interface suffix on exceptions 24 | 25 | ## 0.2.0 26 | 27 | All exceptions are in `Psr\Http\Client` namespace 28 | 29 | ## 0.1.0 30 | 31 | First release 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 PHP Framework Interoperability Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HTTP Client 2 | =========== 3 | 4 | This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. 5 | 6 | Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. 7 | 8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. 9 | 10 | [psr-url]: https://www.php-fig.org/psr/psr-18 11 | [package-url]: https://packagist.org/packages/psr/http-client 12 | [implementation-url]: https://packagist.org/providers/psr/http-client-implementation 13 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr/http-client", 3 | "description": "Common interface for HTTP clients", 4 | "keywords": ["psr", "psr-18", "http", "http-client"], 5 | "homepage": "https://github.com/php-fig/http-client", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "PHP-FIG", 10 | "homepage": "https://www.php-fig.org/" 11 | } 12 | ], 13 | "support": { 14 | "source": "https://github.com/php-fig/http-client" 15 | }, 16 | "require": { 17 | "php": "^7.0 || ^8.0", 18 | "psr/http-message": "^1.0 || ^2.0" 19 | }, 20 | "autoload": { 21 | "psr-4": { 22 | "Psr\\Http\\Client\\": "src/" 23 | } 24 | }, 25 | "extra": { 26 | "branch-alias": { 27 | "dev-master": "1.0.x-dev" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ClientExceptionInterface.php: -------------------------------------------------------------------------------- 1 |