API / Minn\Http / Method

Method enum

Minn\Http\Method · public/minn/src/Minn/Http/Method.php · 33 lines

Uses 1

Cases

caseGet = 'GET'
caseHead = 'HEAD'
casePost = 'POST'
casePut = 'PUT'
casePatch = 'PATCH'
caseDelete = 'DELETE'
caseOptions = 'OPTIONS'
caseAny = '*'

For a route that accepts every method and sorts them out itself.

Public

staticfromName(string $name): self#

The verb for a name, GET when the name is unknown.

methodmatches(self $declared): bool#

HEAD is served by GET handlers; the kernel drops the body.

methodcanonicalRedirects(): bool#

Canonical redirects (trailing slash, pretty-URL mapping, 404 guessing) run only for reads; every other method renders the URL as typed.