Closed axmad386 closed 2 years ago
Not working as expected. See this issue for tracking https://github.com/lukeed/polka/issues/183
I think we need to override Polka.handler
method. Overrides the method just before this line
https://github.com/lukeed/polka/blob/2ce10df97921126ffcc43e23aa14af18f93f49e1/packages/polka/index.js#L73
feature added in this commit 9ad2664e60e24c84cf895da9122260beebcef9fc via query _method
For example this will override method from POST
to PUT
method.
<form action="/user/2/update?_method=PUT" method="POST">
....
</form>
By default, http form request only support GET and POST method. In Laravel we can do something like method overide to support other method. See example below
I think this express middleware can solve this problem. Just need little adjustment for lunox Http Kernel. https://www.npmjs.com/package/method-override See
custom logic
part