PHPackages                             wyrihaximus/react-http-middleware-request-timeout - 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. wyrihaximus/react-http-middleware-request-timeout

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

wyrihaximus/react-http-middleware-request-timeout
=================================================

react/http middleware that times out and cancels long running requests after X seconds

1395[1 PRs](https://github.com/WyriHaximus/reactphp-http-middleware-request-timeout/pulls)PHPCI failing

Since Sep 4Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/reactphp-http-middleware-request-timeout)[ Packagist](https://packagist.org/packages/wyrihaximus/react-http-middleware-request-timeout)[ RSS](/packages/wyrihaximus-react-http-middleware-request-timeout/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Timeout and cancel long running requests after X seconds
========================================================

[](#timeout-and-cancel-long-running-requests-after-x-seconds)

[![Build Status](https://camo.githubusercontent.com/d8be5e3006902d4bda03b7467cc99858104e4f4e6dd58d778c1064938e00bc9d/68747470733a2f2f7472617669732d63692e6f72672f57797269486178696d75732f72656163747068702d687474702d6d6964646c65776172652d726571756573742d74696d656f75742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/WyriHaximus/reactphp-http-middleware-request-timeout)[![Latest Stable Version](https://camo.githubusercontent.com/e0c7f99a92314719b668d28a771943a0cca5f6f8172cb9e323eb34d8f68c2d29/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d687474702d6d6964646c65776172652d726571756573742d74696d656f75742f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/react-http-middleware-request-timeout)[![Total Downloads](https://camo.githubusercontent.com/c8831e3264bd8d3abd4d899ee0dd669401416fa41ed2366d70f2897bb19d738f/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d687474702d6d6964646c65776172652d726571756573742d74696d656f75742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/react-http-middleware-request-timeout)[![Code Coverage](https://camo.githubusercontent.com/2f5f92b0ee2013717489afed7196bba196ced346e104e4882f53ff7c1f2f110f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f72656163747068702d687474702d6d6964646c65776172652d726571756573742d74696d656f75742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/reactphp-http-middleware-request-timeout/?branch=master)[![License](https://camo.githubusercontent.com/00abc34ccd875a20eba8cc65e41e007683e7bd57cf845ccd2960bea4f2767315/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f72656163742d687474702d6d6964646c65776172652d726571756573742d74696d656f75742f6c6963656e73652e706e67)](https://packagist.org/packages/WyriHaximus/react-http-middleware-request-timeout)[![PHP 7 ready](https://camo.githubusercontent.com/42718cddeb81248571079e9a79343ed0f98fbc659d6f1cf0bbf642e84f6d6cbf/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f57797269486178696d75732f72656163747068702d687474702d6d6964646c65776172652d636c6561722d626f64792f62616467652e737667)](https://travis-ci.org/WyriHaximus/reactphp-http-middleware-clear-body)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/react-http-middleware-request-timeout

```

This middleware removes the raw body from the request. Best used after the request body has been parsed.

Usage
=====

[](#usage)

```
$server = new Server([
    /** Other Middleware */
    new RequestTimeoutMiddleware($loop, 10.0), // Will cancel any request taking longer then 10 seconds
    /** Other Middleware */
]);
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2019 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance43

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (8 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/wyrihaximus-react-http-middleware-request-timeout/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-react-http-middleware-request-timeout/health.svg)](https://phpackages.com/packages/wyrihaximus-react-http-middleware-request-timeout)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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