Skip to content

http-php/payload

Repository files navigation

Payload

Latest Version PHP Version Tests Total Downloads

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.

About

A simple OOP wrapper to work with HTTP message payloads in PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages