Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/debuss/borsch-requesthandler

A simple PSR-15 Request Handler implementation.
https://github.com/debuss/borsch-requesthandler

Last synced: about 2 months ago
JSON representation

A simple PSR-15 Request Handler implementation.

Awesome Lists containing this project

README

        

# Borsch - RequestHandler

A simple PSR-15 Request Handler implementation.

This package is part of the Borsch Framework.

## Installation

Via [composer](https://getcomposer.org/) :

`composer require borsch/requesthandler`

## Usage

```php
require_once __DIR__.'/vendor/autoload.php';

use Borsch\RequestHandler\RequestHandler;

$request_handler = new RequestHandler();

$request_handler->middleware(new SomeMiddleware());
$request_handler->middlewares([
new AnotherMiddleware(),
new YetAnotherOneMiddleware(),
// ...
]);

$response = $request_handler->handle(ServerRequestFactory::fromGlobals());
```

## License

The package is licensed under the MIT license. See [License File](https://github.com/debuss/borsch-requesthandler/blob/master/LICENSE.md) for more information.