PHPackages                             cse/helpers-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. [Framework](/categories/framework)
4. /
5. cse/helpers-request

ActiveLibrary[Framework](/categories/framework)

cse/helpers-request
===================

The helpers allows you to Request processing. Get value for POST/GET/REQUEST method by key and set default value, check exist AJAX, POST and GET method - all this is available in this library.

1.0.6(7y ago)69131MITPHPPHP &gt;=7.1

Since Jan 26Pushed 7y ago3 watchersCompare

[ Source](https://github.com/cs-eliseev/helpers-request)[ Packagist](https://packagist.org/packages/cse/helpers-request)[ Docs](https://github.com/cs-eliseev/helpers-request)[ RSS](/packages/cse-helpers-request/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (8)Used By (1)

English | [Русский](https://github.com/cs-eliseev/helpers-request/blob/master/README.ru_RU.md)

REQUEST CSE HELPERS
===================

[](#request-cse-helpers)

[![Travis (.org)](https://camo.githubusercontent.com/bc15be9bc4c50cffca39b88725cd3e61e2f6141c5e55908b04767f4fcefad21e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63732d656c69736565762f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cs-eliseev/helpers-request)[![Codecov](https://camo.githubusercontent.com/25b3f91a5a537a4fb10fe30d02451e00631e10dbe2bfb1c04e9d5819ef93755b/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f63732d656c69736565762f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/cs-eliseev/helpers-request)[![Scrutinizer code quality](https://camo.githubusercontent.com/5507076bb52751ad8bb2dde5cfd1b3224223b5af1cf2953958ce64dc84745ac7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f63732d656c69736565762f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cs-eliseev/helpers-request/?branch=master)

[![Packagist](https://camo.githubusercontent.com/f235a81ddcf54e2cb79879fa595ab2ec7f351664b5f30225d10d0e7c05c6fadc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6373652f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-request)[![Minimum PHP Version](https://camo.githubusercontent.com/dcd4b4aec2c1709157fa6a2c050f709d75cde9552a79cfff0b70a97fad7281ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-request)[![Packagist](https://camo.githubusercontent.com/5704035155c6d83f0b3859f3777f1ca3adabf483c7b738eb23abce9579b4ed5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6373652f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-request/blob/master/LICENSE.md)[![GitHub repo size](https://camo.githubusercontent.com/316123df46523399d0f08ea7371179581e19c1bfab676530cd339fed925fd223/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f63732d656c69736565762f68656c706572732d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-request/archive/master.zip)

The helpers allows you to Request processing. Get value for POST/GET/REQUEST method by key and set default value, check exist AJAX, POST and GET method - all this is available in this library.

Project repository:

**DEMO**

```
switch(true) {
    case Request::isAjax():
    case Request::isPost():
        Request::post('example', 5);
        break;
    case Request::isGet():
        Request::getRequestUri();
        break;
}
```

---

Introduction
------------

[](#introduction)

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) is a collection of several libraries with simple functions written in PHP for people.

Despite using PHP as the main programming language for the Internet, its functions are not enough. REQUEST CSE HELPERS solves the problem set default value to POST, GET and REQUEST method, and check exist AJAX, POST and GET method.

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) was created for the rapid development of web applications.

**CSE Helpers project:**

- [Array CSE helpers](https://github.com/cs-eliseev/helpers-arrays)
- [Cookie CSE helpers](https://github.com/cs-eliseev/helpers-cookie)
- [Date CSE helpers](https://github.com/cs-eliseev/helpers-date)
- [Email CSE helpers](https://github.com/cs-eliseev/helpers-email)
- [IP CSE helpers](https://github.com/cs-eliseev/helpers-ip)
- [Json CSE helpers](https://github.com/cs-eliseev/helpers-json)
- [Math Converter CSE helpers](https://github.com/cs-eliseev/helpers-math-converter)
- [Phone CSE helpers](https://github.com/cs-eliseev/helpers-phone)
- [Request CSE helpers](https://github.com/cs-eliseev/helpers-request)
- [Session CSE helpers](https://github.com/cs-eliseev/helpers-session)
- [Word CSE helpers](https://github.com/cs-eliseev/helpers-word)

Below you will find some information on how to init library and perform common commands.

Install
-------

[](#install)

You can find the most recent version of this project [here](https://github.com/cs-eliseev/helpers-request).

### Composer

[](#composer)

Execute the following command to get the latest version of the package:

```
composer require cse/helpers-request
```

Or file composer.json should include the following contents:

```
{
    "require": {
        "cse/helpers-request": "*"
    }
}
```

### Git

[](#git)

Clone this repository locally:

```
git clone https://github.com/cs-eliseev/helpers-request.git
```

### Download

[](#download)

[Download the latest release here](https://github.com/cs-eliseev/helpers-request/archive/master.zip).

Usage
-----

[](#usage)

The class consists of static methods that are conveniently used in any project. See example [examples-request.php](https://github.com/cs-eliseev/helpers-request/blob/master/examples/examples-request.php).

**POST data by key name**

Example:

```
$_POST['example'] = 12345;
Request::post('example');
// 12345
```

Set default value:

```
Request::post('example_2', 12345);
// 12345
```

**GET data by key name**

Example:

```
$_GET['example'] = 12345;
Request::get('example');
// 12345
```

Set default value:

```
Request::get('example_2', 12345);
// 12345
```

**REQUEST data by key name**

Example:

```
$_REQUEST['example'] = 12345;
Request::request('example');
// 12345
```

Set default value:

```
Request::request('example_2', 12345);
// 12345
```

**Is AJAX**

Example:

```
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'xmlhttprequest';
Request::isAjax();
// true
```

**Is POST**

Example:

```
$_SERVER['REQUEST_METHOD'] = Request::METHOD_POST;
Request::isPost();
// true
```

**Is GET**

Example:

```
$_SERVER['REQUEST_METHOD'] = Request::METHOD_GET;
Request::isGet();
// true
```

**Get request Uri**

Example:

```
$_SERVER['HTTP_REFERER'] = '/link/example';
Request::getRequestUri();
// /link/example
```

Set default value:

```
Request::getRequestUri('/link/home');
// /link/home
```

Ajax Uri:

```
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'xmlhttprequest';
$_SERVER['REQUEST_URI'] = '/link/example_ajax';
Request::getRequestUri();
// /link/example_ajax
```

**Is redirect to HTTPS**

Example:

```
Request::isRedirectedToHttps('http://google.com');
// true
```

Testing &amp; Code Coverage
---------------------------

[](#testing--code-coverage)

PHPUnit is used for unit testing. Unit tests ensure that class and methods does exactly what it is meant to do.

General PHPUnit documentation can be found at .

To run the PHPUnit unit tests, execute:

```
phpunit PATH/TO/PROJECT/tests/
```

If you want code coverage reports, use the following:

```
phpunit --coverage-html ./report PATH/TO/PROJECT/tests/
```

Used PHPUnit default config:

```
phpunit --configuration PATH/TO/PROJECT/phpunit.xml
```

Donating
--------

[](#donating)

You can support this project [here](https://www.paypal.me/cseliseev/10usd). You can also help out by contributing to the project, or reporting bugs. Even voicing your suggestions for features is great. Anything to help is much appreciated.

License
-------

[](#license)

The REQUEST CSE HELPERS is open-source PHP library licensed under the MIT license. Please see [License File](https://github.com/cs-eliseev/helpers-request/blob/master/LICENSE.md) for more information.

---

> GitHub [@cs-eliseev](https://github.com/cs-eliseev)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Recently: every ~21 days

Total

7

Last Release

2573d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3b9e49d0ce3fd71c8eb31b7c14e48373dbb415a9d16950ce52d23bf89b2ae26?d=identicon)[ak\_eliseev](/maintainers/ak_eliseev)

---

Top Contributors

[![cs-eliseev](https://avatars.githubusercontent.com/u/24221291?v=4)](https://github.com/cs-eliseev "cs-eliseev (74 commits)")

---

Tags

ajaxcollectioncollectionscseframeworkgethelperhelperslibraryphppostpostsrequestrequeststooltoolsutilitiesutilityutilsrequestframeworkhelperutilityhelperslibrarytoolcollectioncollectionsajaxtoolsutilsutilitiesgetrequestspostcse

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cse/helpers-session

The helpers allows you to easily manage session data. START, SET, GET DELETE, HAS method session - all this is available in this library.

102.6k3](/packages/cse-helpers-session)[jbzoo/utils

Collection of PHP functions, mini classes and snippets for everyday developer's routine life.

8321.5M36](/packages/jbzoo-utils)[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)

PHPackages © 2026

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