I would like to know why a developer would make a POST request without using a form.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because
GETandPOSTdo not have the same semantic value.GETrequests should be generally safe to perform at any time without compromising the system, whilePOSTrequests should be used when doing something important (like accepting a monetary transaction, or, in a less dramatic way, post a comment or something like that).So it might make sense to make a
POSTrequest through AJAX if its result will affect a system.Source: W3C HTTP/1.1 Method Definitions, read 9.1.1 Safe Methods, 9.3 GET and 9.5 POST. Don’t be afraid, it’s short and to the point.