Closed jakobmats closed 2 years ago
Status handlers allow for specifying request headers while error handlers do not:
$app->status(Status::NOT_FOUND, function (Context $ctx) { $ctx->html('<h1>Not found</h1>'); }, ['Accept' => 'text/html']); $app->status(Status::NOT_FOUND, function (Context $ctx) { $ctx->json(['status' => 'Not found']); }, ['Accept' => 'application/json']);
This should be unified.
In the simplified design both types of mappers will only support content type filtering as it seems to be the only useful case for request headers.
Status handlers allow for specifying request headers while error handlers do not:
This should be unified.