diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-07-23 15:06:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-03 22:21:46 +0000 |
commit | a5bdc6236ad52586579a9a3da6a059835ed60761 (patch) | |
tree | 0990effe331cea168cec1c33593af2f640c880a6 /src/core/net/url_request_custom_job_delegate.h | |
parent | 14a8ac1534bc4314cf6c89aceaaa382f42314dac (diff) |
Add HTTP request headers to custom URL schemes
Makes it possible to read extra headers added to the request.
Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/net/url_request_custom_job_delegate.h')
-rw-r--r-- | src/core/net/url_request_custom_job_delegate.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/net/url_request_custom_job_delegate.h b/src/core/net/url_request_custom_job_delegate.h index caabfcf99..9de0224f9 100644 --- a/src/core/net/url_request_custom_job_delegate.h +++ b/src/core/net/url_request_custom_job_delegate.h @@ -54,6 +54,7 @@ #include "base/memory/ref_counted.h" #include "qtwebenginecoreglobal_p.h" +#include <QMap> #include <QObject> #include <QUrl> @@ -80,6 +81,7 @@ public: QUrl url() const; QByteArray method() const; QUrl initiator() const; + const QMap<QByteArray, QByteArray> &requestHeaders() const; void reply(const QByteArray &contentType, QIODevice *device); void redirect(const QUrl& url); @@ -93,13 +95,15 @@ private: URLRequestCustomJobDelegate(URLRequestCustomJobProxy *proxy, const QUrl &url, const QByteArray &method, - const QUrl &initiatorOrigin); + const QUrl &initiatorOrigin, + const QMap<QByteArray, QByteArray> &requestHeaders); friend class URLRequestCustomJobProxy; scoped_refptr<URLRequestCustomJobProxy> m_proxy; QUrl m_request; QByteArray m_method; QUrl m_initiatorOrigin; + const QMap<QByteArray, QByteArray> m_requestHeaders; }; } // namespace |