Because the server side only accepts PUT method, I used method='PUT' in the HTML form. But the browser didn't use method PUT as expected, it's GET. When I set method='POST' it's POST.
I don't know why method='PUT' doesn't work. I have tested on Chrome and Firefox.
Asked
Active
Viewed 4.2k times
46
Ciro Santilli OurBigBook.com
- 347,512
- 102
- 1,199
- 985
Dagang
- 24,586
- 26
- 88
- 133
-
1try looking at http://stackoverflow.com/questions/812711/how-do-you-do-an-http-put, this has some code examples. – ghostJago Aug 31 '11 at 13:23
2 Answers
88
Browsers only support POST and GET, if you need PUT, you have to send the form via post/get and then do the proper PUT request on server-side.
EDIT although, most implementations of XMLHttpRequest support PUT and DELETE.
cypher
- 6,822
- 4
- 31
- 48