summaryrefslogtreecommitdiff
path: root/tests/http/echoerr.php
blob: 7e1d05e769726ee2e126d97a86e8d67f3d828bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php

use \Psr\Http\Message\ServerRequestInterface;
use \Psr\Http\Message\ResponseInterface;

function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
    error_log(strtoupper($req->getQueryParams()['hello']));

    $resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
    return $resp->withStatus(201);
}