effectra/http-middleware 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

effectra/http-middleware

最新稳定版本:v1.0.0

Composer 安装命令:

composer require effectra/http-middleware

包简介

The Effectra HTTP Middleware package.

README 文档

README

The effectra/http-server-middleware library provides middleware classes for handling HTTP requests and responses in server applications.

Installation

Install the library using Composer:

composer require effectra/http-middleware

Usage

Middleware Class

The Effectra\Http\Server\Middleware class is a base middleware class that implements the MiddlewareInterface. It provides a process method for processing the server request and returning the response.

use Effectra\Http\Server\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;

class MyMiddleware extends Middleware implements MiddlewareInterface
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        // Perform middleware logic here

        $response = $handler->handle($request);

        // Perform additional middleware logic here

        return $response;
    }
}

Contributing

Contributions are welcome! Please feel free to submit bug reports, feature requests, or pull requests.

License

This library is licensed under the MIT License.

Feel free to customize and enhance the README file to better suit your project's needs.

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-19