4 #include "http_fetcher.hpp"
7 // --------------------------------------------------
9 // --------------------------------------------------
10 HttpFetcher::HttpFetcher ()
13 connect (&_http, SIGNAL (done (bool)), SLOT (requestDone (bool)));
17 bool HttpFetcher::busy () const
19 return _http.currentId () != 0;
23 void HttpFetcher::fetch (const QString& url)
28 _http.setHost (u.host ());
29 _http.get (u.encodedPath (), &_buffer);
34 void HttpFetcher::requestDone (bool err)
37 error (_http.error ());
39 done (_buffer.buffer ());
41 _buffer.setBuffer (NULL);