PHPackages                             http-php/payload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. http-php/payload

ActiveLibrary[HTTP &amp; Networking](/categories/http)

http-php/payload
================

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

020PHP

Since Feb 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/http-php/payload)[ Packagist](https://packagist.org/packages/http-php/payload)[ RSS](/packages/http-php-payload/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Payload
=======

[](#payload)

[![Latest Version](https://camo.githubusercontent.com/c4f2aa719555760049d2f617d3766ec58d74283c603fc5967e0dadd211734d31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f687474702d7068702f7061796c6f61642e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/http-php/payload)[![PHP Version](https://camo.githubusercontent.com/bb6c06d4d34cefbb5f31a357594013a5cc454b0b87a347c45f7db205bea9a2df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f687474702d7068702f7061796c6f61642e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Tests](https://github.com/http-php/payload/actions/workflows/test.yml/badge.svg)](https://github.com/http-php/payload/actions/workflows/test.yml)[![Total Downloads](https://camo.githubusercontent.com/1b10eef00a567322061e3b801a65b26ef3a99a90f60791d0aa1fef39ce6fecbe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f687474702d7068702f7061796c6f61642e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6d656469756d76696f6c6574726564)](https://packagist.org/packages/http-php/payload)

This package is to allow you to create HTTP payloads in PHP, in a simple and reliable way.

Installation
------------

[](#installation)

```
composer require http-php/payload
```

Usage
-----

[](#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
-------

[](#testing)

To run the test suite:

```
composer run test
```

Credits
-------

[](#credits)

- [Steve McDougall](https://github.com/JustSteveKing)
- [All Contributors](../../contributors)

LICENSE
-------

[](#license)

The MIT LIcense (MIT). Please see [License File](./LICENSE) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fe82b349821ebd49cf57d65c4cd3e33ae0833222a8438d90fe8921ca899ea?d=identicon)[JustSteveKing](/maintainers/JustSteveKing)

---

Top Contributors

[![JustSteveKing](https://avatars.githubusercontent.com/u/6368379?v=4)](https://github.com/JustSteveKing "JustSteveKing (6 commits)")

### Embed Badge

![Health badge](/badges/http-php-payload/health.svg)

```
[![Health](https://phpackages.com/badges/http-php-payload/health.svg)](https://phpackages.com/packages/http-php-payload)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
