04-03-2013 05:13 AM
I want to make a http request from QML to get some JSON data from Server. I have done this binding C++ and QML. But I am willing to do this using QML only.
I have found some references over Net for XMLHttp request - http://supportforums.blackberry.com/t5/Cascades-De
Justto confirm is it possible for JSOn or others as well, If anybody has succeded in this?
04-03-2013 09:22 AM
Any comments from BB experts are really appreciable..
04-03-2013 09:29 AM
04-05-2013 04:16 PM
You do NOT EVER NEVER EVER want to do an HTTP request in the UI. You want to do network requests and other processes that need to be backend threads to be in C++. Its a bad idea to do it in QML even if it was possible.
04-07-2013 04:39 AM - edited 04-07-2013 04:41 AM
Should be doable. I use parse.com for backend and for a 'entirely QML' app, use AJAX xhr (https://developer.mozilla.org/en-US/docs/DOM/XMLHt
See examples (http://www.w3schools.com/ajax/ajax_xmlhttprequest_
You can use 'limited' JS so test that (works for me).
The request can be 'async' with callback, so should not take too much UI time.
If you are familiar with JS and want to do more e.g. using JQuery, html etc, then you can consider a QML+hybrid HTML5 webview to use lots more JS stuffs with your JSON data.
04-08-2013 01:21 AM
I will try what you have suggested, and will post the results..