How to do a PUT request from a button? #7821
-
I am fairly confused on how to convert an endpoint PUT function to use actions such that it can be called from a button. However ever since the intorduction of Actons, I have no idea on how to convert this piece of code to the newer format. Am i missing something? Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Form Actions are always POST. If you need a PUT endpoint, you can do it as https://kit.svelte.dev/docs/routing#server with |
Beta Was this translation helpful? Give feedback.
Form Actions are always POST. If you need a PUT endpoint, you can do it as https://kit.svelte.dev/docs/routing#server with
server.ts