Download the PHP package effectra/http-message without Composer
On this page you can find all versions of the php package effectra/http-message. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download effectra/http-message
More information about effectra/http-message
Files in effectra/http-message
Download effectra/http-message
More information about effectra/http-message
Files in effectra/http-message
Vendor effectra
Package http-message
Short Description The Effectra HTTP Message package.
License MIT
Package http-message
Short Description The Effectra HTTP Message package.
License MIT
Please rate this library. Is it a good library?
Informations about the package http-message
Effectra HTTP Message
A PSR-7 HTTP message library for PHP 8.1+.
Installation
Requirements
- PHP ^8.1
- psr/http-message ^1.1 || ^2.0
Package Features
- PSR-7 compliant —
Request,Response,ServerRequest,Uri,Stream,UploadedFile,Message - Case-insensitive headers —
hasHeader(),getHeader(),withHeader(), etc. all normalize to lowercase - Immutable with* methods — all PSR-7
with*methods return new instances; mutableset*methods are also available - Response factories —
withJson(),static json(),static html(),static emptyResponse() - ServerRequest utilities —
fromGlobals()factory,replaceHeader()helper - Stream from file path — constructor accepts a file path string and opens it as a resource
- UploadedFile —
getStream()reads from the actual uploaded file - PHP 8 features —
finalclasses,readonlyproperties,#[Immutable]attribute - Comprehensive test suite — 196+ tests, PHPStan level 6 clean
Usage
Creating a Request
Immutable with* methods:
Mutable set* methods:
Creating a Response
Response Factories
All standard HTTP status codes (100–511) are available as class constants:
ServerRequest (from globals)
Working with URIs
Stream
Uploaded Files
Case-Insensitive Headers
All header operations are case-insensitive:
Attributes (PHP 8)
#[Immutable] and #[Deprecated] attributes are available for documentation and static analysis.
PHPStan
Level 6 with baseline. The _ide_helper.php file provides additional type information for better IDE support.
Testing
Contributing
Contributions are welcome. Please open an issue or submit a pull request.
License
MIT
All versions of http-message with dependencies
PHP Build Version
Package Version
The package effectra/http-message contains the following files
Loading the files please wait ...