berlioz/http-message

Berlioz HTTP Message is a PHP library whose implements PSR-7 (HTTP message interfaces) and PSR-17 (HTTP Factories) standards.

v2.3.4 2022-11-17 16:26 UTC

README

Latest Version Software license Build Status Quality Grade Total Downloads

Berlioz HTTP Message is a PHP library whose implements PSR-7 (HTTP message interfaces) and PSR-17 (HTTP Factories) standards.

Installation

Composer

You can install Berlioz HTTP Message with Composer, it's the recommended installation.

$ composer require berlioz/http-message

Dependencies

  • PHP ^8.0
  • PHP libraries:
    • fileinfo
  • Packages:
    • psr/http-message
    • psr/http-factory

Usage

Global

Looks at PSR documentations:

Factory

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