PHPackages                             mtchabok/request - 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. mtchabok/request

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

mtchabok/request
================

php request control

v1.1(5y ago)07MITPHPPHP &gt;=7.0

Since Apr 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mtchabok/request)[ Packagist](https://packagist.org/packages/mtchabok/request)[ RSS](/packages/mtchabok-request/feed)WikiDiscussions v1.1 Synced 6d ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

PHP Web/Cli Request Control
===========================

[](#php-webcli-request-control)

php objective request control for web request or cli request.

- supported web methods: GET, POST, PUT, HEAD, DELETE, PATCH
- CLI Supported
- create manual/global request

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

[](#installation)

This package is listed on [Packagist](https://packagist.org/packages/mtchabok/request).

```
composer require mtchabok/request

```

How To Usage
------------

[](#how-to-usage)

#### Create Request Object

[](#create-request-object)

```
use \Mtchabok\Request\Request;

$request = Request::newRequest(Request::METHOD_CLI);
$request = Request::newRequestGlobal(['method'=>Request::METHOD_GET]);
```

#### Request Server Details ($\_SERVER or local array)

[](#request-server-details-_server-or-local-array)

```
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->server->HTTP_HOST;
$request->server->getString('REMOTE_ADDR', '127.0.0.1');
$request->server['REQUEST_TIME'];
```

#### Request Query Details ($\_GET or local array)

[](#request-query-details-_get-or-local-array)

```
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->query->foo; // string
$request->query->getNumber('id', 12); // numeric: int or float
$request->query['page']; // string
```

#### Request Post Details ($\_POST or local array)

[](#request-post-details-_post-or-local-array)

```
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->post->first_name;
$request->post->getString('last_name', null, ' -'); // return (string) (isset($_POST['last_name']) ?trim($_POST['last_name'], ' -') :null);
$request->post['mobile'];
```

#### Request Set Data

[](#request-set-data)

```
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->post->country = 'Iran';
$request->post->set('city', 'Tehran');
$request->get['postal_code'] = '1234567890';
```

#### Request Delete Data

[](#request-delete-data)

```
use \Mtchabok\Request\Request;
$request = Request::newRequest();
$request->query->delete('postal_code');
unset($request->post->city);
unset($request->post['country']);
```

#### For More Usage Documentation, Use This Request Package By IDE

[](#for-more-usage-documentation-use-this-request-package-by-ide)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~15 days

Total

4

Last Release

2181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ffa7dd709b65d7cb654af598deedb150bbf8075c70a6bdce2ddc4e3d278c644?d=identicon)[mtchabok](/maintainers/mtchabok)

---

Top Contributors

[![mtchabok](https://avatars.githubusercontent.com/u/27890892?v=4)](https://github.com/mtchabok "mtchabok (9 commits)")

---

Tags

php-requestweb requestCli Request

### Embed Badge

![Health badge](/badges/mtchabok-request/health.svg)

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

###  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)[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)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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