Middleware to forward requests and return responses
Middleware to create a http proxy using Guzzle.
This package is installable and autoloadable via Composer as middlewares/proxy.
composer require middlewares/proxy
$target = new Uri('http://api.example.com'); $dispatcher = new Dispatcher([ new Middlewares\Proxy($target) ]); $response = $dispatcher->dispatch(new ServerRequest());
The target of the proxy.
Instance of the client used to execute the requests. If it's not provided, an instance of
GuzzleHttp\Client is created automatically.
Options passed to the guzzle client. See the guzzle documentation for more information
The MIT License (MIT). Please see LICENSE for more information.