Reference
- turned_in_notMethods
Methods Used abort()
To cancel the current request open(method,url,async,user,pwd)
For request settings,
method: Request type (like: GET, POST, HEAD)
url: URL Path
async: Asynchronous true/false
user: username for url authentication (if any)
pwd: password for url authentication (if any)send()
To request the server using GET method send(data)
To request the server using POST method setRequestHeader(header,value)
To send any header to the server getResponseHeader(headerName)
To get specific response header value getAllResponseHeaders()
To get all response header values XMLHttpRequest()
To create a XMLHttpRequest object
- turned_in_notProperties
Properties Used onreadystatechange To define a function, called if readyState property changes readyState To hold the status-code of the XMLHttpRequest
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is readystatus To get the status-code of a request
200: "OK",
404: "Not Found",
Many more Http Message & codesstatusText To get the status-text (e.g. "OK" or "Not Found") responseText To access the response data as a string responseXML To access the XML response data responseURL To get the response url
- turned_in_notEvents
Events Used onloadstart To define a event function, triggered at the start of the request onprogress To define a event function, triggered while request in progress onabort To define a event function, triggered when request is aborted onload To define a event function, triggered when request is received onerror To define a event function, triggered when any error occurred onloadend To define a event function, triggered when request load ends
❮ Prev HTTP Headers