java.lang.Objecttelosys.objects.HttpRequester
Simple HTTP Requester for AJAX requests ( XMLHttpRequest wrapper class )
Constructor Summary | |
HttpRequester()
Creates a new requester without callback ( so no response processing ) |
|
HttpRequester(function callback)
Creates a new requester with a callback function for response processing |
|
HttpRequester(function callback,
function errorCallback)
Creates a new requester with a callback function for response processing and another one for error processing |
Method Summary | |
string |
getHttpStatus()
Returns last response HTTP Status ( XHR.status ) |
string |
getRequestContent()
Returns last request content (request body) |
string |
getRequestContentType()
Returns last request content type |
string |
getResponseText()
Returns last response as text ( XHR.responseText ) |
object |
getResponseXML()
Returns last response as an XML DOM tree ( XHR.responseXML ) |
void |
httpGetAsync(string sUrl,
string sContent,
string sContentType)
Send an "GET" HTTP request to the server in asynchronous mode |
void |
httpGetSync(string sUrl,
string sContent,
string sContentType)
Send an "GET" HTTP request to the server in synchronous mode |
void |
httpPostAsync(string sUrl,
string sContent,
string sContentType)
Send an "POST" HTTP request to the server in asynchronous mode |
void |
httpPostSync(string sUrl,
string sContent,
string sContentType)
Send an "POST" HTTP request to the server in synchronous mode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpRequester()
public HttpRequester(function callback)
callback
- public HttpRequester(function callback, function errorCallback)
callback
- errorCallback
- Method Detail |
public string getRequestContent()
public string getRequestContentType()
public string getHttpStatus()
public string getResponseText()
public object getResponseXML()
public void httpGetSync(string sUrl, string sContent, string sContentType)
sUrl
- sContent
- sContentType
- public void httpGetAsync(string sUrl, string sContent, string sContentType)
sUrl
- sContent
- sContentType
- public void httpPostSync(string sUrl, string sContent, string sContentType)
sUrl
- sContent
- sContentType
- public void httpPostAsync(string sUrl, string sContent, string sContentType)
sUrl
- sContent
- sContentType
-