Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (20 sloc) 0.757 kB
ee1388e @os0x add header support
os0x authored
1 #include <QtNetwork/QNetworkAccessManager>
2 #include <QtNetwork/QNetworkRequest>
3 #include <QtNetwork/QNetworkReply>
4
5 class NetworkAccessManager : public QNetworkAccessManager {
6
818f654 @os0x fix spell
os0x authored
7 Q_OBJECT
ee1388e @os0x add header support
os0x authored
8
9 public:
10 NetworkAccessManager(QObject *parent = 0);
11 void addHeader(QString key, QString value);
f190f51 @baconpat Rather than creating a new NetworkAccessManager when the page is reset,
baconpat authored
12 void resetHeaders();
5b5067f @halogenandtoast Added browser.authenticate for http basic authentication
halogenandtoast authored
13 void setUserName(const QString &userName);
14 void setPassword(const QString &password);
ee1388e @os0x add header support
os0x authored
15
16 protected:
17 QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice * outgoingData);
5b5067f @halogenandtoast Added browser.authenticate for http basic authentication
halogenandtoast authored
18 QString m_userName;
19 QString m_password;
ee1388e @os0x add header support
os0x authored
20
21 private:
22 QHash<QString, QString> m_headers;
5b5067f @halogenandtoast Added browser.authenticate for http basic authentication
halogenandtoast authored
23
24 private slots:
25 void provideAuthentication(QNetworkReply *reply, QAuthenticator *authenticator);
f190f51 @baconpat Rather than creating a new NetworkAccessManager when the page is reset,
baconpat authored
26 };
Something went wrong with that request. Please try again.