Berlioz HTTP Message is a PHP library whose implements PSR-7 (HTTP message interfaces) and PSR-17 (HTTP Factories) standards.
You can install Berlioz HTTP Message with Composer, it's the recommended installation.
$ composer require berlioz/http-message
- PHP ^8.0
- PHP libraries:
- fileinfo
- Packages:
- psr/http-message
- psr/http-factory
Looks at PSR documentations:
- PSR-7 (HTTP message interfaces): https://www.php-fig.org/psr/psr-7/
- PSR-17 (HTTP Factories): https://www.php-fig.org/psr/psr-17/
Only one factory class implements the PSR-17:
\Berlioz\Http\Message\HttpFactory
To help you, the factory is cut into some traits:
\Berlioz\Http\Message\Factory\RequestFactoryTrait
\Berlioz\Http\Message\Factory\ResponseFactoryTrait
\Berlioz\Http\Message\Factory\ServerRequestFactoryTrait
\Berlioz\Http\Message\Factory\StreamFactoryTrait
\Berlioz\Http\Message\Factory\UploadedFileFactoryTrait
\Berlioz\Http\Message\Factory\UriFactoryTrait