Skip to content

Example code that demponstrates how to write a simple proxy using PSR-7 HTTP message objects.

Notifications You must be signed in to change notification settings

darrenmothersele/php-psr7-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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."

About

Example code that demponstrates how to write a simple proxy using PSR-7 HTTP message objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages