Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

NetRequest

Makes HTTP and similar requests from JavaScript. This object is similar to the standard browser XMLHttpRequest object.

...

Constructs a new NetRequest Object.

Code Block
var request = new NetRequest();

Initialization Parameters

None

Methods

Name 

Description 

getResponseHeader

Returns the header field value from the response of which the field name matches header, unless the field name is Set-Cookie or Set-Cookie2. Returns null if either the response has not yet been received or the header doesn't exist in the response. 

open

Sets the request method and request URL. This method differs from the standard XMLHttpRequest's open() method by only accepting two parameters (all requests are asynchronous, and the user/password are entered in the request object's user and password properties.)

send

Initiates the request. The optional argument provides the request entity body. The argument is ignored if request method is GET or HEAD.

setRequestHeader

Appends a header to the list of author request headers, or if header is already in the list of author request headers, combines its value with value.

setTimeout

Sets a timeout, after which the request will be aborted with a 500 status. 

...