Which method HTTP GET/POST used by AJAX requests?
And can we specify the method while making Ajax call?
Which method HTTP GET/POST used by AJAX requests? And can we specify the method
Share
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.
Either. Follow the normal rules for deciding which is appropriate. (i.e. GET is repeatable, POST changes stuff, etc). If you are using XHR, most browsers will let you use any of the HTTP methods, not just GET and POST.
Yes. Well. Usually. Ajax just means “Making an HTTP request and reading the response without leaving the current page”; there are lots of different ways to do that. XHR lets you specify the method, JSON-P doesn’t, submitting a form to a hidden iframe does, dynamically adding an image to the page doesn’t, etc.