4 #include "http_fetcher.hpp"
6 // --------------------------------------------------
8 // --------------------------------------------------
9 HttpFetcher::HttpFetcher ()
12 connect (&_http, SIGNAL (done (bool)), SLOT (requestDone (bool)));
16 bool HttpFetcher::busy () const
18 return _http.currentId () != 0;
22 void HttpFetcher::fetch (const QString& url)
27 _http.setHost (u.host ());
28 _http.get (u.encodedPath (), &_buffer);
33 void HttpFetcher::requestDone (bool err)
36 error (_http.error ());
38 done (_buffer.buffer ());
40 _buffer.setBuffer (NULL);