Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berliozframework/httpmessage
Berlioz HTTP Message is a PHP library whose implements PSR-7 (HTTP message interfaces) and PSR-17 (HTTP Factories) standards.
https://github.com/berliozframework/httpmessage
Last synced: about 1 month ago
JSON representation
Berlioz HTTP Message is a PHP library whose implements PSR-7 (HTTP message interfaces) and PSR-17 (HTTP Factories) standards.
- Host: GitHub
- URL: https://github.com/berliozframework/httpmessage
- Owner: BerliozFramework
- License: mit
- Created: 2018-01-29T14:43:16.000Z (almost 7 years ago)
- Default Branch: 2.x
- Last Pushed: 2023-04-18T12:51:00.000Z (over 1 year ago)
- Last Synced: 2024-11-17T08:54:01.309Z (about 1 month ago)
- Language: PHP
- Homepage: https://getberlioz.com
- Size: 229 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Berlioz HTTP Message
[![Latest Version](https://img.shields.io/packagist/v/berlioz/http-message.svg?style=flat-square)](https://github.com/BerliozFramework/HttpMessage/releases)
[![Software license](https://img.shields.io/github/license/BerliozFramework/HttpMessage.svg?style=flat-square)](https://github.com/BerliozFramework/HttpMessage/blob/2.x/LICENSE)
[![Build Status](https://img.shields.io/github/actions/workflow/status/BerliozFramework/HttpMessage/tests.yml?branch=2.x&style=flat-square)](https://github.com/BerliozFramework/HttpMessage/actions/workflows/tests.yml?query=branch%3A2.x)
[![Quality Grade](https://img.shields.io/codacy/grade/3175956ccec64633be9a057cf549faf2/2.x.svg?style=flat-square)](https://www.codacy.com/manual/BerliozFramework/HttpMessage)
[![Total Downloads](https://img.shields.io/packagist/dt/berlioz/http-message.svg?style=flat-square)](https://packagist.org/packages/berlioz/http-message)**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](https://getcomposer.org/), it's the recommended installation.
```bash
$ 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:
- **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/### 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`