PHPackages                             xiaodi/think-psr7 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. xiaodi/think-psr7

ActiveLibrary[HTTP &amp; Networking](/categories/http)

xiaodi/think-psr7
=================

PSR-7 message implementation that also provides common utility methods

v2.7.7(5y ago)021MITPHPPHP ^7.2

Since May 19Pushed 5y agoCompare

[ Source](https://github.com/edenleung/think-psr7)[ Packagist](https://packagist.org/packages/xiaodi/think-psr7)[ RSS](/packages/xiaodi-think-psr7/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (21)Used By (0)

think-psr7
==========

[](#think-psr7)

```
use think\Psr7\HttpHandlerRunner;
use think\Psr7\ServerRequest;
use think\Psr7\Response;

Route::get('/hello', function (ServerRequest $req, Response $response) {
    $response->getBody()->write('Hello World!');
    return HttpHandlerRunner::make($response->withStatus(200));
});
```

注意
--

[](#注意)

如使用 `HttpHandlerRunner::make()` 返回 response 信息， `public/index.php` 入口文件以下代码将会失效

**此[文件](https://github.com/edenleung/think-psr7/blob/master/src/HttpHandlerRunner.php#L20)代为处理**

**中间件 end 方法 暂时失效**

```
namespace think;

require __DIR__ . '/../vendor/autoload.php';

// 执行HTTP应用并响应
$http = (new App())->http;

$response = $http->run();

// 已失效
$response->send();

// 已失效
$http->end($response);

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~110 days

Recently: every ~150 days

Total

20

Last Release

1910d ago

Major Versions

1.x-dev → v2.7.62021-02-23

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

v2.7.6PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/81fb8c1760e123896567a7795983521f3f6c46a2c041613a176f83603e5e52e9?d=identicon)[xiaodi](/maintainers/xiaodi)

---

Top Contributors

[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (147 commits)")[![mtdowling](https://avatars.githubusercontent.com/u/190930?v=4)](https://github.com/mtdowling "mtdowling (92 commits)")[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (88 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (27 commits)")[![edenleung](https://avatars.githubusercontent.com/u/31346973?v=4)](https://github.com/edenleung "edenleung (15 commits)")[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (13 commits)")[![jeskew](https://avatars.githubusercontent.com/u/705500?v=4)](https://github.com/jeskew "jeskew (12 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (9 commits)")[![jeremeamia](https://avatars.githubusercontent.com/u/107867?v=4)](https://github.com/jeremeamia "jeremeamia (8 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (5 commits)")[![albe](https://avatars.githubusercontent.com/u/4259532?v=4)](https://github.com/albe "albe (4 commits)")[![trowski](https://avatars.githubusercontent.com/u/1628287?v=4)](https://github.com/trowski "trowski (4 commits)")[![zyfran](https://avatars.githubusercontent.com/u/100966?v=4)](https://github.com/zyfran "zyfran (3 commits)")[![uda](https://avatars.githubusercontent.com/u/199314?v=4)](https://github.com/uda "uda (3 commits)")[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (3 commits)")[![kkopachev](https://avatars.githubusercontent.com/u/2279051?v=4)](https://github.com/kkopachev "kkopachev (3 commits)")[![Kevinrob](https://avatars.githubusercontent.com/u/4509277?v=4)](https://github.com/Kevinrob "Kevinrob (2 commits)")[![andreskrey](https://avatars.githubusercontent.com/u/8786949?v=4)](https://github.com/andreskrey "andreskrey (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (2 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")

---

Tags

psr-7thinkphphttpresponserequestpsr-7streamurlmessageuri

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xiaodi-think-psr7/health.svg)

```
[![Health](https://phpackages.com/badges/xiaodi-think-psr7/health.svg)](https://phpackages.com/packages/xiaodi-think-psr7)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[pdeans/http

PSR-7 cURL HTTP client with support for PSR-17 HTTP factories.

1466.2k3](/packages/pdeans-http)[workerman/psr7

PSR-7 message implementation that also provides common utility methods

1079.8k10](/packages/workerman-psr7)[chillerlan/php-httpinterface

A PSR-7/17/18 http message/client implementation

1417.1k5](/packages/chillerlan-php-httpinterface)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
