summaryrefslogtreecommitdiff
path: root/tests/http/user-agent.php
blob: 03d7a2c86c364b2d27cc4cc84e5b1418610e7e35 (plain)
1
2
3
4
5
6
7
8
9
10
<?php

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

function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface
{
    $resp->getBody()->write($_SERVER['HTTP_USER_AGENT']);
    return $resp;
}