http-php / payload
A simple OOP wrapper to work with HTTP message payloads in PHP
dev-main
2023-02-04 19:59 UTC
Requires
- php: ^8.2
Requires (Dev)
- laravel/pint: ^1.4.1
- pestphp/pest: ^1.22.4
- phpstan/phpstan: ^1.9.14
This package is auto-updated.
Last update: 2024-12-05 00:18:31 UTC
README
This package is to allow you to create HTTP payloads in PHP, in a simple and reliable way.
Installation
composer require http-php/payload
Usage
To use this package, it is very simple. Create a payload using the following code:
use HttpPHP\Payload\Payload; $payload = Payload::make( body: '{"test": "test"}', // add your json content here. ); $payload->parse(); // ['test' => 'test'']; parse to get payload as an array.
This package currently supports the following payload types:
- JSON
Testing
To run the test suite:
composer run test
Credits
LICENSE
The MIT LIcense (MIT). Please see License File for more information.