asgrim/random-status-code-middleware

Middleware to set a random status code

Maintainers

👁 asgrim

Package info

github.com/asgrim/random-status-middleware

pkg:composer/asgrim/random-status-code-middleware

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 7

Open Issues: 1

0.0.1 2019-06-26 14:32 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 5c501c29cc2653ef4a523d24f9e54a94600a7c79

  • James Titcumb <james.woop@asgrim.com>

This package is auto-updated.

Last update: 2026-06-27 07:27:30 UTC


README

Randomise the status code returned from a middleware pipeline.

👁 CircleCI

Given a middleware pipeline, change the HTTP status code to a new random status code.

Inspired by my own tweet: https://twitter.com/asgrim/status/1143523405335019520

Installation

  • composer require asgrim/random-status-middleware

Usage

Add \Asgrim\RandomStatusMiddleware\RandomStatusMiddleware into your middleware pipeline. Probably works best towards the outermost layer to ensure the status code is not overwritten unintentionally by another middleware.