summaryrefslogtreecommitdiff
path: root/tests/http/payload.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http/payload.php')
-rw-r--r--tests/http/payload.php18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/http/payload.php b/tests/http/payload.php
deleted file mode 100644
index b7a0311f..00000000
--- a/tests/http/payload.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\ServerRequestInterface;
-
-function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
-{
- if ($req->getHeaderLine("Content-Type") != 'application/json') {
- $resp->getBody()->write("invalid content-type");
- return $resp;
- }
-
- // we expect json body
- $p = json_decode($req->getBody(), true);
- $resp->getBody()->write(json_encode(array_flip($p)));
-
- return $resp;
-}