MY mENU


Monday 26 March 2012

XMLHttpRequest Methods

abort(): Cancels the current request.
getAllResponseHeaders(): Returns the complete set of HTTP headers as a string.
getResponseHeader( headerName ): Returns the value of the specified HTTP header.
open( method, URL )
open( method, URL, async )
open( method, URL, async, userName )
open( method, URL, async, userName, password )
: Specifies the method, URL, and other optional attributes of a request.

The method parameter can have a value of "GET", "POST", or "HEAD". Other HTTP methods, such as "PUT" and "DELETE" (primarily used in REST applications), may be possible

The "async" parameter specifies whether the request should be handled asynchronously or not . "true" means that script processing carries on after the send() method, without waiting for a response, and "false" means that the script waits for a response before continuing script processing.

send( content ): Sends the request.
setRequestHeader( label, value ) :Adds a label/value pair to the HTTP header to be sent.

No comments:

Post a Comment