Namespace Pot.Net.XHR
Defined in: <pot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
The XMLHttpRequest handler object.
|
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 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.
|
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.