Hello Tobias,

i am using the request-Object with a GET-Method like this:

                        var req = new 
qx.io.remote.Request("http://devserver/projectdetail/costs_report/source/costs_report_backend.php","GET","text/plain";);
                        req.setParameter("p_id", pid);
                        req.setParameter("action", "GetCostsList");
                        req.setTimeout(10000);
                        req.addEventListener("completed", function(e){
                                try
                                {
                                        var content = e.getContent();

                                        if (content.length > 0)
                                        {
                                                //alert(content);
                                                var tabledata = 
qx.io.Json.parse(content);
                                                tableModel.setData(tabledata);
                                        }
                                }
                                catch (ex)
                                {
                                        alert("Fehler bei Erhalt der 
Tabellendaten: " + ex.toString());
                                }
                        });

(you may have seen this code before... ;-) )

without using the encodeURI-Method and the call is send to 
http://devserver/projectdetail/costs_report/source/costs_report_backend.php as 
exspected. The browser runs on my workstation, not on the devserver.

HTH & regards,
-- 
Andreas Tepper
Softwareentwicklung

Animationsfabrik GmbH
Donnerstrasse 20
D-22763 Hamburg

Tel:    +49 40 398415-10
Fax:    +49 40 398415-32
E-Mail: [EMAIL PROTECTED]
Web:    www.animationsfabrik.de  

Amtsgericht Hamburg
HRB 75488
Geschäftsführer: Jörn Radel
Sitz der Gesellschaft: Hamburg
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tobias Koller 
(GERMO GmbH)
Sent: Friday, December 14, 2007 1:27 PM
To: qooxdoo Development
Subject: Re: [qooxdoo-devel] silly question: how topostdata toanother 
application?

Hi stefan,

I think qx.io.remote.Request will not work, 
cause the "url" I add as a parameter to the qx.io.remote.Request is always 
added to the current URL right?

Here is my example:

                        var url = encodeURI("http://localhost:9876/test.php";);
                        
                        
                var r = new qx.io.remote.Request(url, "POST", 
qx.util.Mime.JSON);
                r.setCrossDomain(true);
                r.setData("test=abc");
                r.setAsynchronous(true);
                r.setTimeout(20000);
                var retVal = "";
                
                        r.addEventListener("completed", function(e) {
                                retVal = e.getContent();
                                alert(retVal);
                });
        
                r.send();


the problem is that the requested url is then 
http://mycomputer/germo/myapp/application/source/http://localhost:9876/test.php 
right?

That's what I thinks, cause if I use this:
var url = encodeURI("test.php");
then the requested url is 
http://mycomputer/germo/myapp/application/source/test.php

the first example doesn't work. No Request starts...


Tobias

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Fa. Linstep, 
Stefan Volbers
Gesendet: Freitag, 14. Dezember 2007 12:52
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] silly question: how to postdata toanother 
application?

Andreas, I think you may be right, the rpc proxy could be overkill... 
I'm just used to communicate to a defined back end from my app via 
JSON-RPC. Thus I'm not so accustomed to using the pure request.

When trying it (in qx0.6.6), I happened to notice that rpc.setParameter 
just adds the parameters to the URL as a GET type string despite of 
having set POST to the request's method. I succeeded in POSTing a var by 
  using

myRpc.setData("testdata=123");

Is qx.io.remote.Request's behaviour in qooxdoo 0.7.2 different?


Tobias, the request does allow to use
http://demo.qooxdoo.org/current/apiviewer/#qx.io.remote.Request~setCrossDomain

So maybe it really fits your needs indeed. Please tell is if you 
succeeded if you give it a try.

Thanks
Stefan

Andreas Tepper schrieb:
> Hi,
> 
> maybe i did not get the point, but why not just using the Request-Object:
> 
>                       var req = new 
> qx.io.remote.Request("http://localhost:9876","POST","text/plain";);
> 
>                       req.setParameter("paramName", "paramValue");
> 
>                       req.addEventListener("completed", function(e){
>                               var content = e.getContent();
>                       });
> 
>                       req.send(); 
> 
> HTH,

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to