I had to leave "application/json" for "text/plain".
That's the only way I found (in the incredible hurry I am, so maybe  
there is other solutions) to ensure POST request using json string in  
it.
The only thing is that I have to do that by hand aftet the request  
succedd :

var req = new qx.io.remote.Request(url, "POST", "text/plain");

req.addListener("completed", function(e) {
        var resp = e.getContent();
        data = qx.util.Json.parseQx(resp);
[CUT]

On 6 Feb 2009, at 14:33, Andy Fuchs wrote:

> Hi Florian,
>
> I already tried that too, with no success.
>
> If I do a TCPDump of the request, it turns out, that the Transport- 
> method
> changes from 'POST' to 'GET' no matter what I specify... That's why
> communication fails...
>
> What can I do to ensure 'POST'??
>
> thx
>
> andy
>
>
>
>
> On 06.02.09 13:33, "Florian Giesen" <[email protected]>  
> wrote:
>
>> Hello Andy,
>>
>> if you want to execute jscon rpcs then you should use
>> http://demo.qooxdoo.org/current/apiviewer/ 
>> index.html#qx.io.remote.Rpc. It
>> works perfect and is much more comfortable. You can even choose  
>> between
>> diffrent backend implementations (PHP, Perl, ...) if you need one.
>>
>> Regards, Florian
>>
>>
>> 2009/2/6 Andy Fuchs <[email protected]>
>>
>>> Hi folks,
>>>
>>> I am struggling with a very basic problem:
>>>
>>> I try to get data from a server, but all I get is a parameter error.
>>>
>>> Communication is json-rpc
>>> Transport-method is 'POST'.
>>>
>>> The native call is
>>>
>>> curl -d "{ \"method\": \"test.anymethod\", \"id\": 1 }"
>>> http://192.168.1.1/myControl
>>>
>>> and works fine from my Terminal.
>>>
>>> Here's a stripped down call:
>>>
>>> var req = new qx.io.remote.Request(vUrl, "POST", "application/ 
>>> json");
>>> var requestObject =
>>>      {
>>>           "method"  : "test.anymethod",
>>>           "id"      : 1
>>>     };
>>> req.setData(qx.util.Json.stringify(requestObject));
>>> req.send();
>>>
>>> All I get is a parameter error 'rpc method missing'...
>>>
>>> I am pretty sure it must be something obvious - but I don't see  
>>> it.... ;-)
>>>
>>> Any hint appreciated.
>>>
>>> andy
>>>
>>>
>>>
>>>
>>>
>>>
> ----------------------------------------------------------------------------->
>  
> >
> -
>>> Create and Deploy Rich Internet Apps outside the browser with
>>> Adobe(R)AIR(TM)
>>> software. With Adobe AIR, Ajax developers can use existing skills  
>>> and code
>>> to
>>> build responsive, highly engaging applications that combine the  
>>> power of
>>> local
>>> resources and data with the reach of the web. Download the Adobe  
>>> AIR SDK
>>> and
>>> Ajax docs to start building applications today-
>>> http://p.sf.net/sfu/adobe-com
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser with  
>> Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills  
>> and code to
>> build responsive, highly engaging applications that combine the  
>> power of local
>> resources and data with the reach of the web. Download the Adobe  
>> AIR SDK and
>> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with  
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills  
> and code to
> build responsive, highly engaging applications that combine the  
> power of local
> resources and data with the reach of the web. Download the Adobe AIR  
> SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to