Thruster HttpModifier Component (Modifies PSR-7 Request & Responses)

2.0.0 2016-01-24 22:48 UTC

This package is auto-updated.

Last update: 2023-05-13 23:46:03 UTC


[Latest Version] ( [Software License] (LICENSE) [Build Status] ( [Code Coverage] ( [Quality Score] ( [Total Downloads] (

[Email] (

The Thruster HttpModifier Component. Provides a backbone for modifying PSR-7 Request/Response for HTTP Clients/Servers and other utilities which uses PSR-7 standard.

Collection of Thruster Http Modifiers


Via Composer

$ composer require thruster/http-modifier

For PHP < 7.0

For older PHP version than PHP7 there is branch php5

$ composer require thruster/http-modifier ">=1.0,<2.0"


There are four type of modifiers:

  • ServerRequestModifierInterface
  • RequestModifierInterface
  • ResponseModifierInterface
  • MessageModifierInterface

Each of them has own Collection to group them and run modify on each of modifier.

Standalone modifier

$modifier = new class implements ResponseModifierInterface {
	public function modify(ResponseInterface $response) : ResponseInterface
		return $response->withHeader('X-Powered-By', 'Thruster/1.0');

$response = $modifier->modify($response);

Using collection

$collection = new ResponseModifierCollection();
$collection->add(new ServerTimeModifier());
$collection->add(new PoweredByModifier('Thruster/1.0'));

$response = $collection->modify($response);

Nesting collections

$collectionA = new ResponseModifierCollection();
$collectionA->add(new ServerTimeModifier());
$collectionA->add(new PoweredByModifier('Thruster/1.0'));

$collectionB = new ResponseModifierCollection();

$response = $collectionB->modify($response);


$ composer test


Please see CONTRIBUTING and CONDUCT for details.


Please see License File for more information.