ricardofiorani/guzzle-psr18-adapter

一个 Guzzle PSR-18 适配器

v1.0.5 2021-03-21 19:35 UTC

This package is auto-updated.

Last update: 2024-09-06 16:28:16 UTC


README

Build Status Minimum PHP Version License Total Downloads Coding Standards

一个非常简单的 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

致谢