Skip to content
Example code that demponstrates how to write a simple proxy using PSR-7 HTTP message objects.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
web
.gitignore
README.md
composer.json
composer.lock

README.md

PHP PSR-7 Proxy

Some example code that demonstrates how to write a simple proxy using PSR-7 http message objects.

See this blog post for more info.

Usage

Run the example:

php -S localhost:8080 web/proxy.php

Then use CURL, Postman, or your favourite API testing tool to run some requests. The example code proxies connections to the JSONPlaceholder fake API.

So instead of /posts you can try /posts. Or, instead of /posts?userId=1 you can use /posts?userId=1.

License

WTFPL "The WTFPL is a very permissive license for software and other scientific or artistic works that offers a great degree of freedom. In fact, it is probably the best license out there."

You can’t perform that action at this time.