PHPackages                             guinso/hx-route - 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. guinso/hx-route

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

guinso/hx-route
===============

HTTP REST router

2.0.0(10y ago)023MITPHPPHP &gt;=5.6

Since Dec 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/guinso/hx-route)[ Packagist](https://packagist.org/packages/guinso/hx-route)[ RSS](/packages/guinso-hx-route/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

hx-route
========

[](#hx-route)

Simple HTTP routing utility. Can use for REST handler.

Install Package
---------------

[](#install-package)

### Composer

[](#composer)

```
//for PHP 7
{
  "require": {
    "guinso/hx-route": "2.0.*"
  }
}

//for PHP 5
{
  "require": {
    "guinso/hx-route": "1.0.*"
  }
}
```

### Manual

[](#manual)

```
require_once("hx-route-directory/src/autoloader.php");
```

Example
-------

[](#example)

```
// method options: GET, POST, PUT, DELETE, or any standard HTTP method
//$inputData specification can read from hx-http
//$inputData = array(
//    "data" => ....  client input value
//   "file" => ... client upload file path value
//);
$routeConfigure = array(
	new \Hx\Route\Info("/your/customer/(\w+)", "GET", function($arg, $inputData) {
		$urlArgument = $arg[0]; //this is value from URL argument (\w+)

		//get general value
		$clientSpecificKeyValue = $inputData["date"]["clientSpecificKey"];

		//get temporary uploaded file path
		$clientUploadFilePath = $inputData["file"]["clientSpecificFileName"];
	},

	new \Hx\Route\Info("/another/custom/path", "POST", function($arg, $inputData) {
		//handle another request
	}
);

//initialize URL routing handler
$router = new \Hx\Route\RestRouter(
  new \Hx\Route\Mapper($routeConfigure),
  new \Hx\Http\HeaderReader(),
  new \Hx\Http\InputService());

$router->run(); //start process incoming request URL
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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

Total

3

Last Release

3650d ago

Major Versions

1.0.1 → 2.0.02016-07-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1818236?v=4)[Benjamin Ching](/maintainers/guinso)[@guinso](https://github.com/guinso)

---

Top Contributors

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

---

Tags

http

### Embed Badge

![Health badge](/badges/guinso-hx-route/health.svg)

```
[![Health](https://phpackages.com/badges/guinso-hx-route/health.svg)](https://phpackages.com/packages/guinso-hx-route)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.0k1.1B6.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k728.6M2.5k](/packages/psr-http-factory)[php-http/httplug

HTTPlug, the HTTP client abstraction for PHP

2.6k319.6M739](/packages/php-http-httplug)[psr/http-client

Common interface for HTTP clients

1.7k714.1M2.7k](/packages/psr-http-client)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k330.1M4.6k](/packages/symfony-http-client)

PHPackages © 2026

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