1 2 3 4 5 6 7 8 9
<?php use \Psr\Http\Message\ServerRequestInterface; use \Psr\Http\Message\ResponseInterface; function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface { return $resp->withAddedHeader("Header", $req->getQueryParams()['hello']); }