request

Provides server-side request and response objects.


This extension provides server-side request and response objects for PHP.

These are *not* HTTP message objects proper. They are more like wrappers for existing global PHP variables and functions.

Four classes and one interface are defined in the global namespace:

- _SapiRequest_, composed of read-only copies of PHP superglobals and some other commonly-used values.

- _SapiUpload_, a value-object style descriptor of each uploaded file.

- _SapiResponse_ and _SapiResponseInterface_, essentially a wrapper around (and buffer for) response-related PHP functions.

- _SapiResponseSender_, for sending a _SapiResponse_.

License: MIT

Latest releases

Version Release Download
2.0.0 2020-04-08 request-2.0.0.tgz
1.0.0b2 2017-07-25 request-1.0.0b2.tgz
1.0.0b1 2016-12-18 request-1.0.0b1.tgz
1.0.0a2 2016-11-21 request-1.0.0a2.tgz
1.0.0a1 2016-11-17 request-1.0.0a1.tgz
Show all releases

Changelog

Version Message
2.0.0 First 2.0 release, updated for PHP 7.3, 7.4, 8.0, and later.
1.0.0b2 Added:

- Support for multiple header callbacks, a la header_register_callback, with
new methods ServerResponse::setHeaderCallbacks(), addHeaderCallback(), and
getHeaderCallbacks().
1.0.0b1 Added:

- ServerRequest::$forwarded property, computed from
$_SERVER['HTTP_FORWARDED']

- ServerRequest::$forwarded(For|Host|Proto), computed from
$_SERVER['HTTP_X_FORWARDED(FOR|HOST|PROTO)']
1.0.0a2 Please see CHANGELOG.md for release notes.
1.0.0a1 Please see CHANGELOG.md for release notes.
Show complete changelog