Focus of this control is to make the callback process very easy but still provide robust error management.
To make multiple simultaneous callbacks create multiple instances of this class.
function wwHttpSample() { var Http = new wwHttp(); var Result = Http.send("http://localhost/",null,TestCallback,OnError); } function TestCallback(Result) { alert("SUCCESS" + Result); } function OnError(Result) { alert("*** On Error Called:\r\n\r\n" + Result.message); }
Member | Description | |
---|---|---|
appendHeader | Appends an HTTP header to the current request. o.wwHttp.addHeader(HeaderName,Value) | |
encodeFormVars | Creates a URL encoded string of all the form variables for a given form on the page. o.encodeFormVars(FormVars,NoViewState) | |
encodeValue | Urlencodes a single value. o.encodeValue(value) | |
returnError | This method creates a CallbackException object and then calls teh errorCallback function for this wwHttp instance if one is defined. o.returnError(Message) | |
send | Used to make an asynchronous HTTP call to the server and return the result into a callback function. This method provides error handling and any errors that occur are fired into the OnError handler. o.send(Url,PostData,Callback,ErrorCallback) | |
contentType | The content type for any POST data that might be sent. | |
evalResult | Determines whether the result from the callback is automatically evaluated using eval(). Useful for JSON responses. |