weew / echo-server
A very simple echo server.
v1.2.1
2016-07-21 11:17 UTC
Requires
- weew/helpers-filesystem: ^1.2
- weew/http: ^1.9
Requires (Dev)
- phpunit/phpunit: ^4.7
- satooshi/php-coveralls: ^0.6.1
This package is not auto-updated.
Last update: 2024-12-17 22:38:28 UTC
README
Table of contents
Installation
composer require weew/echo-server
Introduction
The echo server will always return a serialized version of the incoming request. It is meant to be used as an endpoint for your API tests.
Example
You can see it in action at http://echo.maxim.io
{ "protocol": "HTTP", "version": "1.1", "method": "GET", "url": { "protocol": "http", "tld": "io", "domain": "maxim", "subdomain": "echo", "host": "echo.maxim.io", "port": null, "path": "/foo", "query": { "bar": "baz" }, "username": null, "password": null, "fragment": null, "full": "http://echo.maxim.io/foo?bar=baz" }, "headers": { "host": ["echo.maxim.io"], "connection": ["keep-alive"], "accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"], "upgrade-insecure-requests": ["1"], "user-agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"], "accept-encoding": ["gzip, deflate, sdch"], "accept-language": ["en-US,en;q=0.8,de;q=0.6,fr;q=0.4,ru;q=0.2,uk;q=0.2,nb;q=0.2"], "content-type": [""], "content-length": [""] }, "data": [], "query": { "bar": "baz" }, "cookies": [], "content": "" }