4 ms·
PUT is not supported in the browser [1], but web APIs are mainly intended for non-browser clients to access. A client app that consumes a well-designed HTTP web
by RyanMcGreal 15y ago
PUT is not supported in the browser [1], but web APIs are mainly intended for non-browser clients to access. A client app that consumes a well-designed HTTP web API will use POST to create a resource, PUT to update a resource, and so on.
[1] With the caveat that the Javascript XMLHttpRequest API does support PUT and DELETE.
- Sniffnoy 15y agoI don't understand this distinction. A client is a client; how are you to distinguish "browsers" from other clients?
- ominous_prime 15y agoThe GP here was poorly worded. It's not that browsers don't support PUT and DELETE (they do, and it's used all the time vie XMLHttpRequest), it's that HTML doesn't support those verbs for forms. You're right in that a "client is a client", and the API doesn't (or shouldn't) care.