diff options
author | Nils Schwabe | 2014-03-04 17:54:57 +0100 |
---|---|---|
committer | Nils Schwabe | 2014-03-04 17:54:57 +0100 |
commit | 03b7858c880ea1fba3915af17c55b42d5e13c58a (patch) | |
tree | 7d1ea603194b98d213c3f90253371ef974f8ee0f /src/httpxmldownloader.cpp | |
parent | Added httpxmldownloader (diff) | |
download | vmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.tar.gz vmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.tar.xz vmchooser2-03b7858c880ea1fba3915af17c55b42d5e13c58a.zip |
- included the --url commandline options for a xml url
- httpxmldownloader moved to main.cpp (it's finally working :D)
- given url is downloaded and printed on commandline
- todo: parse http response
Diffstat (limited to 'src/httpxmldownloader.cpp')
-rw-r--r-- | src/httpxmldownloader.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/httpxmldownloader.cpp b/src/httpxmldownloader.cpp index 4474b9d..788f8f2 100644 --- a/src/httpxmldownloader.cpp +++ b/src/httpxmldownloader.cpp @@ -6,11 +6,17 @@ httpxmldownloader::httpxmldownloader() { nam = new QNetworkAccessManager(this); QObject::connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(finishedSlot(QNetworkReply*))); + /** + * TODO: + * connect readyRead() + * + */ - QString url_string = "http://localhost/test.xml"; + qDebug() << "httpdownloader"; +} - QUrl url(url_string); - nam->get(QNetworkRequest(url)); +QNetworkReply* httpxmldownloader::makeRequest(const QString& xmlurl) { + return nam->get(QNetworkRequest(QUrl(xmlurl))); } void httpxmldownloader::finishedSlot(QNetworkReply* reply) { |