View Single Post
  #2 (permalink)  
Old 09-17-2008, 01:03 PM
ab5602 ab5602 is offline
Project Contributor
 
Posts: 67
Default

Figured it Out

I found some documentations regarding the AjxRpcRequest.invoke() method in the source code:

Code:
 * Sends this request to the target URL. If there is a callback, the request is
 * performed asynchronously.
 *
 * @param {String} requestStr HTTP request string/document
 * @param {String} serverUrl request target
 * @param {Array} requestHeaders Array of HTTP request headers (optional)
 * @param {AjxCallback} callback callback for asynchronous requests. This callback
 *              will be invoked when the requests completes. It will be passed the same
 *              values as when this method is invoked synchronously (see the return values
 *              below) with the exception that if the call times out (see timeout param
 *              below), then the object passed to the callback will be the same as in the
 *              error case with the exception that the status will be set to
 *              <code>AjxRpcRequest.TIMEDOUT</code>
 * @param {Boolean} useGet if true use get method, else use post. If ommitted
 *              defaults to post
 * @param {Int} timeout Timeout (in milliseconds) after which the request is
 *              cancelled (optional)
So, changing the "useGet" to "false" obviously solved my problem and the following code works just great, even through the proxy!

Code:
 
var request = new AjxRpcRequest("zimlet"); 
 var reqHeader = {"Content-Type":"application/x-www-form-urlencoded"};
 var reqParam = AjxStringUtil.urlEncode("a=b");
 var info_url = "http://test.com";
 var url = ZmZimletBase.PROXY + AjxStringUtil.urlEncode(info_url);
 request.invoke(reqParam, url, reqHeader, new AjxCallback(this, my.callback, div), false);
Reply With Quote