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. [HTTP &amp; Networking](/categories/http)
4. /
5. darkphp/monster

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

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 yesterday

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 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

1003d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120723120?v=4)[Hossein Pira](/maintainers/ReactMVC)[@ReactMVC](https://github.com/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)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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