Parent Directory | Revision Log
pass by reference
1 | torben | 528 | #include "httpwrapper.h" |
2 | |||
3 | #include <QHttp> | ||
4 | #include <QApplication> | ||
5 | #include <QUrl> | ||
6 | |||
7 | |||
8 | |||
9 | HttpWrapper::HttpWrapper() | ||
10 | { | ||
11 | } | ||
12 | |||
13 | torben | 904 | QByteArray HttpWrapper::getSyncData(QString& uri) |
14 | torben | 528 | { |
15 | QHttp http; | ||
16 | QUrl url(uri); | ||
17 | http.setHost(url.host() ); | ||
18 | http.get(url.path() + "?" + url.encodedQuery(), 0); | ||
19 | |||
20 | while (http.currentId() != 0 ) | ||
21 | { | ||
22 | qApp->processEvents(); | ||
23 | usleep(1000); | ||
24 | } | ||
25 | |||
26 | return http.readAll(); | ||
27 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |