middlewares/proxy

Name: proxy

Owner: Middlewares

Description: PSR-15 middleware to forward requests and return responses

Created: 2017-04-07 19:06:07.0

Updated: 2018-05-02 20:02:34.0

Pushed: 2018-01-27 11:08:16.0

Homepage: null

Size: 17

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

middlewares/proxy

Latest Version on Packagist Software License Build Status Quality Score Total Downloads SensioLabs Insight

Middleware to create a http proxy using Guzzle.

Requirements
Installation

This package is installable and autoloadable via Composer as middlewares/proxy.

oser require middlewares/proxy
Example
get = new Uri('http://api.example.com');

patcher = new Dispatcher([
new Middlewares\Proxy($target)


ponse = $dispatcher->dispatch(new ServerRequest());
Options
__construct(Psr\Http\Message\UriInterface $uri)

The target of the proxy.

client(GuzzleHttp\ClientInterface $client)

Instance of the client used to execute the requests. If it's not provided, an instance of GuzzleHttp\Client is created automatically.

options(array $options)

Options passed to the guzzle client. See the guzzle documentation for more information


Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.