PHPackages                             darkphp/monster - 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. darkphp/monster

ActiveLibrary

darkphp/monster
===============

A simple PHP class for making HTTP requests using cURL

1.0.8(2y ago)12103MITPHP

Since Jul 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ReactMVC/HTTPMonster)[ Packagist](https://packagist.org/packages/darkphp/monster)[ RSS](/packages/darkphp-monster/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)DependenciesVersions (10)Used By (0)

HTTPMonster
===========

[](#httpmonster)

HTTPMonster is a PHP class that provides a simple and easy-to-use interface for making HTTP requests using cURL. It allows you to easily set HTTP headers, request body, request method, and other options.

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

[](#installation)

You can install HTTPMonster using Composer:

```
composer require darkphp/monster

```

Usage
-----

[](#usage)

To use HTTPMonster, you first need to create an instance of the class:

```
require_once 'vendor/autoload.php';

use DarkPHP\HTTPMonster;

$http = new HTTPMonster();
```

### Setting Request Options

[](#setting-request-options)

HTTPMonster provides several methods for setting request options:

```
$http->Url('https://example.com');
$http->Method('POST');
$http->Headers([
    'Content-Type: application/json',
    'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX'
]);
$http->Body('{"foo": "bar"}');
$http->Timeout(30);
echo $http->getBody();
```

### Sending the Request

[](#sending-the-request)

To send the request, simply call the `Send()` method:

```
$response = $http->Send();
```

The `Send()` method returns the response from the server as a string.

### Getting the HTTP Status Code

[](#getting-the-http-status-code)

You can get the HTTP status code of the response using the `getStatus()` method:

```
$status = $http->getStatus();
```

### Add 1 Option

[](#add-1-option)

HTTPMonster add cURL options for the request. You can modify these defaults by calling the `Option()` method:

```
$http->Option(CURLOPT_RETURNTRANSFER, true);
```

### Chaining Methods

[](#chaining-methods)

HTTPMonster allows you to chain methods to make the code more readable:

```
$response = $http->Url('https://example.com')
    ->Method('POST')
    ->Headers([
        'Content-Type: application/json',
        'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX'
    ])
    ->Body('{"foo": "bar"}')
    ->Timeout(30)
    ->Send();
```

Error Handling
--------------

[](#error-handling)

HTTPMonster throws an exception if cURL encounters an error while executing the request. You should always catch these exceptions to handle errors properly:

```
try {
    $response = $http->Send();
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

License
-------

[](#license)

HTTPMonster is licensed under the MIT License. See `LICENSE` for more information.

Developer
---------

[](#developer)

HTTPMonster is developed by Hossein Pira.

- Email:
- Telegram: @h3dev

If you have any questions, comments, or feedback, please feel free to contact John via email or Telegram.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~19 days

Total

9

Last Release

957d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7589f7f27297860e288c59f142cc38a8b390ff70011d730cdda754ef06edf9c9?d=identicon)[ReactMVC](/maintainers/ReactMVC)

---

Top Contributors

[![ReactMVC](https://avatars.githubusercontent.com/u/120723120?v=4)](https://github.com/ReactMVC "ReactMVC (13 commits)")

### Embed Badge

![Health badge](/badges/darkphp-monster/health.svg)

```
[![Health](https://phpackages.com/badges/darkphp-monster/health.svg)](https://phpackages.com/packages/darkphp-monster)
```

PHPackages © 2026

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