summaryrefslogtreecommitdiff
path: root/tests/http/push.php
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-30 19:10:43 +0300
committerGitHub <[email protected]>2018-09-30 19:10:43 +0300
commit427b060039b65dda9497fad8c1c719b8d06c7996 (patch)
treec1f9a3ca639cc52ba9c144d9c3c2bba444bf78aa /tests/http/push.php
parent6122fca108c20984732c969fb1ba53cce5b3c44a (diff)
parent50873a2adabc54aff53fac814d770e3571e37efb (diff)
Merge pull request #41 from spiral/feature/https-server
Feature/https server
Diffstat (limited to 'tests/http/push.php')
-rw-r--r--tests/http/push.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/http/push.php b/tests/http/push.php
new file mode 100644
index 00000000..bf56dbb6
--- /dev/null
+++ b/tests/http/push.php
@@ -0,0 +1,10 @@
+<?php
+
+use \Psr\Http\Message\ServerRequestInterface;
+use \Psr\Http\Message\ResponseInterface;
+
+function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
+{
+ $resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
+ return $resp->withAddedHeader("http2-push", __FILE__)->withStatus(201);
+} \ No newline at end of file