ingenioz-it/http-message

PSR-7 HTTP 消息接口和 PSR-17 HTTP 工厂实现的实现

v2.0.0 2023-05-10 16:32 UTC

This package is auto-updated.

Last update: 2024-09-10 20:02:25 UTC


README

实现PSR-7 Http Message接口和PSR-17 Http Factories接口,重点在于代码质量。

关于

安装

composer require ingenioz-it/http-message

额外功能

此实现严格遵循PSR-7和PSR-17规范,同时也提供了一项有用的额外功能:能够从全局变量中创建ServerRequest对象。

use IngeniozIT\Http\Message\ServerRequestFactory;

$factory = new ServerRequestFactory(/* ... */);
$serverRequest = $factory->fromGlobals($GLOBALS);

完整文档

你可以通过运行以下命令列出所有可用功能:

composer testdox