QGIS/python/core/qgsnetworkcontentfetcher.sip

44 lines
1.0 KiB
Plaintext
Raw Normal View History

/**
\class QgsNetworkContentFetcher
\ingroup core
\brief HTTP network content fetcher. A simple method for fetching remote HTTP content
and converting the content to standard formats. Url redirects are automatically
handled.
\since 2.5
*/
class QgsNetworkContentFetcher : QObject
{
%TypeHeaderCode
#include <qgsnetworkcontentfetcher.h>
%End
public:
QgsNetworkContentFetcher();
virtual ~QgsNetworkContentFetcher();
2015-07-29 11:52:14 +02:00
/** Fetches content from a remote URL and handles redirects. The finished()
* signal will be emitted when content has been fetched.
* @param url URL to fetch
2016-02-14 03:50:23 +01:00
*/
void fetchContent( const QUrl& url );
2015-07-29 11:52:14 +02:00
/** Returns a reference to the network reply
* @returns QNetworkReply for fetched URL content
2016-02-14 03:50:23 +01:00
*/
QNetworkReply* reply();
2015-07-29 11:52:14 +02:00
/** Returns the fetched content as a string
* @returns string containing network content
2016-02-14 03:50:23 +01:00
*/
QString contentAsString() const;
signals:
2015-07-29 11:52:14 +02:00
/** Emitted when content has loaded
2016-02-14 03:50:23 +01:00
*/
void finished();
};