HTTP Methods Supported by XHR

List all the supported XHR methods.

By
skeptic_fx 1 Seen 1091 times
Tags
xhr
Run this test now.

Results


Tested on
Chrome - 66 - Mac OS X
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
Chromium - 65 - Ubuntu
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
Firefox - 59 - Mac OS X
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - The operation is insecure.
TRACKNot Allowed - The operation is insecure.
TRACENot Allowed - The operation is insecure.
CUSTOMAllowed

Tested on
Unknown Browser - Unknown Version - Unknown OS
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
Googlebot - 2.1 - undefined
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
IE - 10 - Windows 8
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - SecurityError
TRACKNot Allowed - SecurityError
TRACENot Allowed - SecurityError
CUSTOMAllowed

Tested on
Maemo Browser - undefined - Linux
HTTP MethodIs allowed?

Tested on
Opera - 47 - Windows 10
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
Safari - 7 - Mac OS X
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - SecurityError: DOM Exception 18
TRACKNot Allowed - SecurityError: DOM Exception 18
TRACENot Allowed - SecurityError: DOM Exception 18
CUSTOMAllowed

Tested on
Chrome Mobile - 41 - Android
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'CONNECT' HTTP method is unsupported.
TRACKNot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACK' HTTP method is unsupported.
TRACENot Allowed - Failed to execute 'open' on 'XMLHttpRequest': 'TRACE' HTTP method is unsupported.
CUSTOMAllowed

Tested on
Edge - 17.17134 - Windows 10
HTTP MethodIs allowed?
HEADAllowed
GETAllowed
POSTAllowed
OPTIONSAllowed
PUTAllowed
DELETEAllowed
CONNECTNot Allowed - SecurityError
TRACKNot Allowed - SecurityError
TRACENot Allowed - SecurityError
CUSTOMAllowed

User Script (ENUM_FUNCTION)

					
// Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK.  Reference: http://www.w3.org/TR/XMLHttpRequest/#request-method 

// From the specs
// Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK.
// http://www.w3.org/TR/XMLHttpRequest/#request-method

function test(data){
	// We need to separate properties and access one by one.
try{
    var xhr = new XMLHttpRequest();
    xhr.open(data.toString(), '/test', true);
    // At this stage, if we have an Exception, the header is not allowed.
    addResult(data,  'Allowed');
}

catch(err){
	addError(data,  'Not Allowed - '+ err.message);
}

}
					
				

Enum Data (ENUM_FUNCTION)

					
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

var data = ['HEAD', 'GET', 'POST', 'OPTIONS', 'PUT', 'DELETE', 'CONNECT', 'TRACK', 'TRACE', 'CUSTOM'];