Optional
anonymousOptional
binarySend the data
string as a blob
. This is for compatibility with Tampermonkey/Greasemonkey, where only string
type is allowed in data
.
Optional
contextCan be an object and will be assigned to context of the response object.
Optional
dataData to send with the request, usually for POST
and PUT
requests.
Optional
headersSome special headers are also allowed:
Cookie
Host
Origin
Referer
User-Agent
Optional
methodHTTP method, default as GET
.
Optional
onabortOptional
onerrorOptional
onloadOptional
onloadendOptional
onloadstartOptional
onprogressOptional
onreadystatechangeOptional
ontimeoutOptional
overrideA MIME type to specify with the request.
Optional
passwordPassword for authentication.
Optional
responseOne of the following:
text
(default value)json
blob
arraybuffer
document
Optional
timeoutTime to wait for the request, none by default.
URL relative to current page is also allowed.
Optional
userUser for authentication.
When set to
true
, no cookie will be sent with the request and the response cookies will be ignored. The default value isfalse
.