summaryrefslogtreecommitdiff
path: root/tests/http/data.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http/data.php')
-rw-r--r--tests/http/data.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/http/data.php b/tests/http/data.php
new file mode 100644
index 00000000..c5e0bab0
--- /dev/null
+++ b/tests/http/data.php
@@ -0,0 +1,18 @@
+<?php
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+
+function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
+{
+
+ $data = $req->getParsedBody();
+
+ ksort($data);
+ ksort($data['arr']);
+ ksort($data['arr']['x']['y']);
+
+ $resp->getBody()->write(json_encode($data));
+
+ return $resp;
+} \ No newline at end of file