super-simple/http-server-handler
Composer 安装命令:
composer require super-simple/http-server-handler
包简介
Super Simple HTTP Server Handler library implmenting the PSR-15 standard.
README 文档
README
A Super Simple HTTP Handler library implementing the PSR-15.
Install
composer require super-simple/http-server-handler
Requires PHP 8.1 or newer.
Usage
Basic usage:
// Create a handler, the $defaultResponse must implement Psr\Http\Message\ResponseInterface. $handler = new HTTPServerHandler($defaultResponse); // Handle the request $response = $handler->handle($request);
It's possible to add Middlewares.
//.... create a handler // The $middleware must implement Psr\Http\Server\MiddlewareInterface $handler->addMiddleware($middlware); // ... handle the request.
For more details check out the wiki.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-04