Reputation: 2575
A form in my app has the following:
<form action="/faculty/update/agxzdGFuZHJld3NqaHNyDQsSB0ZhY3VsdHkYBww" method="PUT" accept-charset="utf-8">
However, upon submission the request is treated as a GET and is handled by def get()
and not def put().
Any help would be appreciated!
Edit:
Thanks for the responses. If I can't use method="PUT"
what is the best way of directed the form the the put()
method within my handler class? Should I add another handler within main.py?
Upvotes: 0
Views: 757
Reputation: 344311
HTML v4 and XHTML v1 only support the GET and POST request methods within HTML forms.
On the other hand the GET, POST, PUT and DELETE methods are supported via XMLHttpRequest in all modern browsers.
Related Stack Overflow post:
EDIT:
Further to your update, I think your only options would be:
Upvotes: 6
Reputation: 2040
Browsers only do GET & POST methods. See if your app's platform can simulate PUT methods via a "method" parameter.
Upvotes: 2
Reputation: 143319
I believe GET and POST are the only valid values on a FORM method attribute.
Upvotes: 1