Inject: $request only

Route handler declares only $request. The framework injects the ZealPHP\HTTP\Request wrapper — headers, query, body, server vars, all accessible.

Live URL

GET /demo/inject/request-only

Response

Status
200 OK
Content-Type
application/json
{
    "method": "GET",
    "uri": "/",
    "host": "php.zeal.ninja",
    "injected": [
        "request"
    ]
}