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

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

function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
    $resp->getBody()->write(strtoupper($req->getQueryParams()['hello']));
    return $resp->withAddedHeader("Http2-Push", __FILE__)->withStatus(201);
}