aboutsummaryrefslogtreecommitdiff
path: root/lib/web/webprofile.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/webprofile.h')
-rw-r--r--lib/web/webprofile.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/web/webprofile.h b/lib/web/webprofile.h
index b58fad7..269989b 100644
--- a/lib/web/webprofile.h
+++ b/lib/web/webprofile.h
@@ -65,6 +65,10 @@ public:
{
return qAsConst(m_cookies);
}
+ const QMap<QByteArray, QByteArray> headers() const
+ {
+ return qAsConst(m_headers);
+ }
// search url
QString search() const;
@@ -86,6 +90,8 @@ public:
void setHttpCacheMaximumSize(int maxSize);
void setHttpCacheType(int type);
void setHttpUserAgent(const QString &userAgent);
+ void setHttpHeader(const QString &name, const QString &value);
+ void removeHttpHeader(const QString &name);
void setSpellCheckEnabled(bool enable);
@@ -97,6 +103,8 @@ signals:
void propertyChanged(const QString &name, const QVariant &value);
void attributeChanged(const QWebEngineSettings::WebAttribute attribute, const bool value);
+ void headerChanged(const QString &name, const QString &value);
+ void headerRemoved(const QString &name);
private:
static WebProfile *profile;
@@ -107,6 +115,7 @@ private:
QUrl m_newtab = QUrl("about:blank");
QVector<QNetworkCookie> m_cookies;
+ QMap<QByteArray, QByteArray> m_headers;
};
#endif // SMOLBOTE_WEBENGINEPROFILE_H