summaryrefslogtreecommitdiff
path: root/tests/http/echoerr.php
blob: da2ff4d8f72420c43065fc178a59a56138a61802 (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);
}