#include <QtNetwork>
#include "http_fetcher.hpp"
-#include "connection.hpp"
-#include "globals.hpp"
// --------------------------------------------------
// HttpFetcher
{
QUrl u (url);
- if (!CHECK_FOR_CONNECTION || ConnectionChecker::instance ()->isConnected ())
- if (u.isValid ()) {
- _http.setHost (u.host ());
- _http.get (u.encodedPath (), &_buffer);
- }
+ if (u.isValid ()) {
+ _http.setHost (u.host ());
+ _http.get (u.encodedPath (), &_buffer);
+ }
}
_buffer.close ();
_buffer.setBuffer (NULL);
}
+
+
+void HttpFetcher::reset ()
+{
+ if (!busy ())
+ return;
+
+ _http.abort ();
+}