ricardofiorani / guzzle-psr18-adapter
一个 Guzzle PSR-18 适配器
v1.0.5
2021-03-21 19:35 UTC
Requires
- php: ^7.1 || ^8.0
- guzzlehttp/guzzle: ^6.3
- psr/http-client: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.3 || ^9
- spryker/code-sniffer: ^0.12.4 || ^0.14.0 || ^0.15.0
Provides
This package is auto-updated.
Last update: 2024-09-06 16:28:16 UTC
README
一个非常简单的 Guzzle PSR-18 适配器。
要求
- PHP ^7.1 || ^8.0
- Guzzle ^6.3
安装
通过 Composer
$ composer require ricardofiorani/guzzle-psr18-adapter
用法
$client = new \RicardoFiorani\GuzzlePsr18Adapter\Client(); $request = new \Your\Implementation\Of\Psr7\Request(); try { echo $client->sendRequest($request); } catch (\Psr\Http\Client\ClientExceptionInterface $exception) { // your error handling }
有关更多文档,请参阅 http://docs.guzzlephp.org/en/stable/
测试
$ composer test