diff options
author | Wolfy-J <[email protected]> | 2019-01-17 12:58:51 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-01-17 12:58:51 +0300 |
commit | 7a13e71af6a81039e119cc7b9e7592f93de59e60 (patch) | |
tree | 6ba3f88dd7c7f5c70c634ee3561da8a8b6eb1b39 /tests | |
parent | d92d3a253d4dec4ca37523b89ad932a471db02b8 (diff) |
__SERVER now support HTTP_... values
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http/server.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/http/server.php b/tests/http/server.php new file mode 100644 index 00000000..e5b295b6 --- /dev/null +++ b/tests/http/server.php @@ -0,0 +1,11 @@ +<?php + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; + +function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface +{ + $resp->getBody()->write(strtoupper($req->getHeaderLine('input'))); + + return $resp->withAddedHeader("Header", $req->getQueryParams()['hello']); +}
\ No newline at end of file |