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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Middleware to create a http proxy using Guzzle.
This package is installable and autoloadable via Composer as middlewares/proxy.
oser require middlewares/proxy
get = new Uri('http://api.example.com');
patcher = new Dispatcher([
new Middlewares\Proxy($target)
ponse = $dispatcher->dispatch(new ServerRequest());
__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.