PHPackages                             endpot/php-rest-proxy - 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. [API Development](/categories/api)
4. /
5. endpot/php-rest-proxy

ActiveLibrary[API Development](/categories/api)

endpot/php-rest-proxy
=====================

A php rest proxy script based on guzzle

v1.0.1(7y ago)108311MITPHP

Since Oct 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/endpot/php-rest-proxy)[ Packagist](https://packagist.org/packages/endpot/php-rest-proxy)[ RSS](/packages/endpot-php-rest-proxy/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

php-rest-proxy
==============

[](#php-rest-proxy)

About
-----

[](#about)

This project is aimed to ultilize a rest proxy with php basing on Guzzle. Up to now, the script works fine for the most common request method (GET/POST/PUT/DELETE/OPTIONS). When data is submitted with POST method and contain multipart/form-data content, the script would create a new MultipartStream with global constant $\_POST and $\_FILES, and then transfer to target uri. The script also supports simple middleware within which you can deal with the request/response.

关于
--

[](#关于)

该项目基于Guzzle实现请求的转发，包括但不限于GET/POST/PUT/DELETE/OPTIONS等方法。当请求方法为POST，且内容类型为multipart/form-data时，由于PHP的特性，从php://input中获取不到原始的数据，脚本会解析POST和FILES数组生成MultipartStream，再进行转发。该脚本还支持简单的中间件，分别作用于请求转发前后，对请求和响应进行处理。

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

[](#installation)

Install using composer:

```
composer require endpot/php-rest-proxy

```

Example
-------

[](#example)

```
// create proxy instance
$proxy = new \Proxy\Proxy();

// set target url
$targetUrl = 'http://httpbin.org/';

// create psr7 request based on the global parameters
$request = $proxy->fromGlobals();

// add middlewares
// forward request to target
$response = $proxy->addMiddleware('ExampleMiddleware')
    ->forward($request)
    ->to($targetUrl);

// get and show the response
echo $response->getBody();
```

License
-------

[](#license)

It is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~373 days

Total

2

Last Release

2799d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4209116?v=4)[HunterX](/maintainers/HunterXuan)[@HunterXuan](https://github.com/HunterXuan)

---

Top Contributors

[![HunterXuan](https://avatars.githubusercontent.com/u/4209116?v=4)](https://github.com/HunterXuan "HunterXuan (9 commits)")[![idealogica](https://avatars.githubusercontent.com/u/15087194?v=4)](https://github.com/idealogica "idealogica (1 commits)")

---

Tags

phpproxyrest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/endpot-php-rest-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/endpot-php-rest-proxy/health.svg)](https://phpackages.com/packages/endpot-php-rest-proxy)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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