POST,PUT,DELETE requests method keeps returning 405 method not found
peterson-umoke opened this issue · comments
I have been screaming at my computer for hours now. Everything seems to be done right, but i can't get any other method apart from GET requests to work.
Its keeps returning this error
`
Method Not Allowed
HTTP 405 (GET /contactz)
[vendor/bcosca/fatfree-core/base.php:1835] Base->error() [index.php:16] Base->run()`
You need to add the verb to your route. If none is specified, then it
defaults to just allowing GET.
$f3->route('GET|HEAD|POST|DELETE @sessions: /sessions', 'PJH\Page->sessions');
Or use map() if you're doing REST:
https://fatfreeframework.com/3.7/routing-engine#ReST:RepresentationalStateTransfer
…On Fri, 11 Mar 2022, 12:20 Peterson Umoke, ***@***.***> wrote:
Its keeps returning this error
`
<title>405 Method Not Allowed</title> Method Not Allowed
HTTP 405 (GET /contactz)
[vendor/bcosca/fatfree-core/base.php:1835] Base->error()
[index.php:16] Base->run()
`
—
Reply to this email directly, view it on GitHub
<#1249 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6B4LVRRORLR7NFZUI7ANDU7M27LANCNFSM5QPPBDEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Incidentally, this sort of question is better suited to the group, rather than raising an issue: