diff options
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 |