Class Index | File Index

Classes


Namespace Pot.Net.XHR


Defined in: <potlite.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
The XMLHttpRequest handler object.
Field Summary
Field Attributes Field Name and Description
<static>  
Pot.Net.XHR.ReadyState
Status constants for XMLHTTP: {@link http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/xmlsdk/html/0e6a34e4-f90c-489d-acff-cb44242fafc6.asp }
Method Summary
Method Attributes Method Name and Description
<static>  
Pot.Net.XHR.factory()
XMLHttpRequest factory.
<static>  
Pot.Net.XHR.request(url, (options))
Send HTTP request with the XMLHttpRequest.
Namespace Detail
Pot.Net.XHR
The XMLHttpRequest handler object.
Field Detail
<static> {Object} Pot.Net.XHR.ReadyState
Status constants for XMLHTTP: {@link http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/xmlsdk/html/0e6a34e4-f90c-489d-acff-cb44242fafc6.asp }
Method Detail
<static> {Function} Pot.Net.XHR.factory()
XMLHttpRequest factory.
Returns:
{Object} The XMLHttpRequest object.

<static> {Function} Pot.Net.XHR.request(url, (options))
Send HTTP request with the XMLHttpRequest.
  Pot.Net.XHR.request('/data.cgi', {
    method : 'POST',
    sendContent : {
      query  : 'Book OR Media',
      start  : 0,
      length : 15,
      format : 'json'
    },
    headers : {
      'Content-Type' : 'text/javascript'
    }
  }).then(function(res) {
    debug(res.responseText);
  }, function(err) {
    debug('Error!');
    debug(err);
  });
Parameters:
{String} url
The request URL.
{Object} (options)
Request options.
                                +----------------------------------
                                | Available options:
                                +----------------------------------
                                - method       : {String}    'GET'
                                - sendContent  : {Object}    null
                                - queryString  : {Object}    null
                                - username     : {String}    null
                                - password     : {String}    null
                                - headers      : {Object}    null
                                - mimeType     : {String}    null
                                - cache        : {Boolean}   true
                                - sync         : {Boolean}   false
                                - responseType : {String}    null
                                - binary       : {Boolean}   false
                                - cookie       : {Boolean}   false
                                - crossDomain  : {Boolean}   false
                                
Returns:
{Deferred} Return the instance of Pot.Deferred.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 21 2012 19:35:45 GMT+0900 (JST)