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

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

aozora0000/request
==================

HTTP GET/POST Method Wrapper

018PHP

Since Sep 10Pushed 11y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

HTTP GET/POST Method Wrapper
============================

[](#http-getpost-method-wrapper)

[![Build Status](https://camo.githubusercontent.com/7ed92d0a6a1f53933456faee117537499d435bdf0007cd1f64c7e1990c503f1b/68747470733a2f2f7472617669732d63692e6f72672f616f7a6f7261303030302f726571756573742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aozora0000/request)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4c5816804e4eee6478d65517725781f3e708344cac97fb6e616881a393f8b084/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616f7a6f7261303030302f726571756573742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/aozora0000/request/?branch=master)

get HTTPMethod Wrapper With Validate System

How To Install (Use Composer)
-----------------------------

[](#how-to-install-use-composer)

- composer.json

```
{
    "require" : {
        "aozora0000/request" : "dev-master"
    }
}

```

```
$ composer install

```

How To Use
----------

[](#how-to-use)

### Include&amp;Configure

[](#includeconfigure)

```
include "./vendor/autoload.php";
use Aozora0000\Request;

/*
 *  @return Object(Default)
 *  @configure
 *      returnType object | array
 */
$configure = array("returnType"=> "array");
$request = new Request($configure);

```

### UseCase

[](#usecase)

- Simple Use Case Sample

```
/*
 *  No Validation
 */
$message = $request->post("message");

/*
 *  OnlyNumeric FROM $_GET["id"]
 */
$get_id  = $request->get("id",Request::NUMERIC);

/*
 *  OnlyNumeric On Closure FROM $_POST["id"]
 */
$post_id = $request->post("id",function($val) {
    return preg_match("/^[0-9]{1,5}$/",$val);
});

/*
 *  No Validation FROM $_POST
 */
$allParams = $request->post();

/*
 *  No Validation FROM $_POST on Closure (multi params using $val['paramname'])
 */
$allParams = $request->post(null,function($val) {
    return (
        preg_match("/^[0-9]+$/",$val['id']) &&
        preg_match("/^\w(\s{1})?\w$/",$val['name'])
    );
});

```

- Preset Validate Case

```
***Caution***
Preset Validate Case Is Not Use Closure!

/*
 *  OnlyNumeric On setValid Method
 */
$request->setValid(Request::NUMERIC);
$get_id = $request->get("id");
$get_year = $request->get("year");

```

### ValidateAttributeRegex

[](#validateattributeregex)

```
Request::NUMERIC            "/^[0-9]+$/"
Request::FLOAT              "/^[0-9]+\.[0-9]+$/"
Request::ALPHANUMERIC       "/^[A-Za-z0-9_]+$/i"
Request::URI                "/^(http|https|ftp):\/\/[-\w\.]+(:\d+)?(\/[^\s]*)?$/"
Request::ZIPCODE            "/^([0-9]{3}-[0-9]{4})?$|^[0-9]{7}+$/i"
Request::MAIL               "/^[-+.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]{2,6}$/i"
Request::PHONE              "/^0\d{9,11}$/"
Request::PHONE_WITH_HYPHEN  "/^\d{2,4}-\d{3,4}-\d{3,4}$/"
Request::TIME               "/^([0-1]?[0-9]|[2][0-3]):[0-5][0-9]$/"
Request::DATE               "/^(\d{4})(-|\/)(\d{1,2})(-|\/)(\d{1,2})$/"

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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/2e5305e78dacfef23567237cc8bf5498d2edfec6c2e54111524cf3da8a12a4f1?d=identicon)[aozora0000](/maintainers/aozora0000)

---

Top Contributors

[![aozora0000](https://avatars.githubusercontent.com/u/4034952?v=4)](https://github.com/aozora0000 "aozora0000 (16 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/aozora0000-request/health.svg)](https://phpackages.com/packages/aozora0000-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)[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)
