Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ricardofiorani/guzzle-psr18-adapter

A simple guzzle PSR-18 adapter
https://github.com/ricardofiorani/guzzle-psr18-adapter

adapter guzzle php psr-18 psr-7

Last synced: about 9 hours ago
JSON representation

A simple guzzle PSR-18 adapter

Awesome Lists containing this project

README

        

# guzzle-psr18-adapter

[![Build Status](https://api.travis-ci.org/ricardofiorani/guzzle-psr18-adapter.svg?branch=master)](http://travis-ci.org/ricardofiorani/guzzle-psr18-adapter)
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/ricardofiorani/guzzle-psr18-adapter.svg)](https://php.net/)
[![License](https://poser.pugx.org/ricardofiorani/guzzle-psr18-adapter/license.png)](https://packagist.org/packages/ricardofiorani/guzzle-psr18-adapter)
[![Total Downloads](https://poser.pugx.org/ricardofiorani/guzzle-psr18-adapter/d/total.png)](https://packagist.org/packages/ricardofiorani/guzzle-psr18-adapter)
[![Coding Standards](https://img.shields.io/badge/cs-PSR--4-yellow.svg)](https://github.com/php-fig-rectified/fig-rectified-standards)

A (very) simple guzzle PSR-18 adapter.

## Requirements
- PHP ^7.1 || ^8.0
- Guzzle ^6.3

## Install

Via Composer

``` bash
$ composer require ricardofiorani/guzzle-psr18-adapter
```

## Usage

```php
$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
}
```
For futher documentation please see [http://docs.guzzlephp.org/en/stable/](http://docs.guzzlephp.org/en/stable/)

## Testing

``` bash
$ composer test
```

## Credits

- [Ricardo Fiorani][link-author]
- [All Contributors][link-contributors]

[link-author]: https://github.com/ricardofiorani
[link-contributors]: ../../contributors