[solved] Howto download HTTP (GET)
-
Hello.
How can I download a website via something like httpget to e.g. a string ?
Thank you
-
Did you have a look to the "HTTP example":http://developer.qt.nokia.com/doc/qt-4.8/network-http.html aready?
-
Can this also be realized more easily within the qml without additional files?
-
Please be aware that while QML is excellent for creating beautiful and fluid interfaces, for most heavy lifting you will need to use C++ files to fill in the needs of your application logic.
The intent is not to be able to do all things with QML/Javascript instead of C++ (though there is a lot that can be done within that space.)
-
Actually xmlhttprequest would make this easy...
http://qt-project.org/doc/qt-4.8/declarative-xml-xmlhttprequest-xmlhttprequest-example-qml.html
If you just want a text string then change this line:
@var a = doc.responseXML.documentElement;@
to
@var a = doc.responseText;@
I hope that helps.
-
Thank you!
This worked great!
I didn't think, that it is so easy.