Hello,
i implement an GUI for my project, this can be connected via JSON API
over POST.
This was a example where i found on this list:
var.req = new.gx.io.request.Xhr();
req.setUrl("http://xxxx:8890/api/v0.1");
req.setCache(false);
req.setMethod("POST");
req.setAsync(true);
req.setRequestData('{"version" : "json-rpc-2.0"}');
req.addListener("changePhase", function (evt) {
this.debug("Phase is: " + evt.getData());
});
req.send();
005264 qx.core.Init: Load runtime: 5264ms
Native...3928623 (Zeile 62)
005477 qx.ui.basic.Image[193-0]: try to load an unmanaged relative
image: resource/gui/Lord-Zero-One.png
Native...3928623 (Zeile 62)
005658 qx.core.Init: Main runtime: 298ms
Native...3928623 (Zeile 62)
005917 qx.core.Init: Finalize runtime: 200ms
Native...3928623 (Zeile 62)
010140 gui.LoginWindow[41-0]: Phase is: opened
Native...3928623 (Zeile 62)
POST http://xxxx:8890/api/v0.1?nocache=1337703673448 200 OK 338ms <<---
This Line is in the Firebug Log RED!!!
Xhr.js...5794234 (Zeile 328)
010347 gui.LoginWindow[41-0]: Phase is: sent
Native...3928623 (Zeile 62)
010670 gui.LoginWindow[41-0]: Phase is: load
If it went to load, it stops.
This is my logging for the TCP connection:
==>POST /api/v0.1?nocache=1337707554131 HTTP/1.1
==>Host: xxxx:8890
==>User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0)
Gecko/20100101 Firefox/12.0
==>Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,
application/json
==>Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
==>Accept-Encoding: gzip, deflate
==>Connection: keep-alive
==>Content-Type: application/json
==>Content-Length: 113
==>Origin: null
==>Pragma: no-cache
==>Cache-Control: no-cache
==>
==>{"version" : "json-rpc-2.0"}
[00:00.011 - server connected]
<==HTTP/1.1 200 OK
<==Content-Length: 283
<==X-Powered-By: TornadoServer/2.2
<==Server: Open Infrastructure Manager/0.0.0.1
<==Pragma: no-cache
<==Date: Tue, 22 May 2012 19:26:04 CEST+0200
<==Content-Type: application/json
<==Set-Cookie: session_id="NmYxMzY1OThiMzZhMD"; expires=Thu, 21 Jun
2012 17:26:04 GMT; Path=/
<==
<=={"jsonrpc": "2.0", "result": {"message": "These are a list.",
"code": 10010, "return": {"list" : null}, "id": 3}
But not more, for me this is looks like a correct connection, but it
does not work.
I hope you can help me!
Many many, thanks.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel