Given HTTP supports various methods like GET
, PUT
, POST
, DELETE
( and more like PATCH
, HEAD
, OPTIONS
etc). I am thinking which of these methods does a AJAX
request use. Or does we have the option of saying which of these methods we want to use while making AJAX
requests.
Asked
Active
Viewed 2,377 times
1

Chadwick Robbert
- 1,026
- 1
- 11
- 23
-
Maybe this [question can clarify you doubts](https://stackoverflow.com/questions/165779/are-the-put-delete-head-etc-methods-available-in-most-web-browsers), take a look. – andreybleme Jul 22 '17 at 03:12
-
1This question should not be marked as duplicate. For novice developers, it is difficult to understand similarity between AJAX and browser supported HTTP methods. Moreover, the question here marked as original talks about form submission. AJAX has nothing to do with form submission. One can simply program AJAX without HTML form element. This was a very valid question. – Chadwick Robbert Feb 18 '20 at 08:58
2 Answers
1
Ajax supports all of the above. It's especially easy to specify which method you want to use if you use jQuery.

Difster
- 3,264
- 2
- 22
- 32
-
-
I meant that using jQuery for ajax is easier in general than straight JavaScript. – Difster Jul 22 '17 at 04:23
-
Yes, but they do not differ at all with respect to specifying the request method. – Julian Reschke Jul 23 '17 at 07:26
1
HTML forms (up to HTML version 4 and XHTML 1) only support GET and POST
as HTTP request methods. A workaround for this is to tunnel other methods through POST by using a hidden form field which is read by the server and the request dispatched accordingly.
However, GET, POST, PUT and DELETE
are supported by the implementations of XMLHttpRequest (i.e. AJAX calls) in all the major web browsers (IE, Firefox, Safari, Chrome, Opera).
reference : Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

Arun pandian M
- 862
- 10
- 17