diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-03 19:13:09 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-03 19:13:09 +0900 |
commit | 83427d7e20008f05bfc78339b3cdb30719c77272 (patch) | |
tree | 019ced231e26df550643ba302690a218159c88cb /jobs/basejob.h | |
parent | c62180d910cc23b5360bbb0807d792f876f195a6 (diff) | |
download | libquotient-83427d7e20008f05bfc78339b3cdb30719c77272.tar.gz libquotient-83427d7e20008f05bfc78339b3cdb30719c77272.zip |
BaseJob::makeRequestUrl
A static method that constructs a request URL for this job and the passed set of parameters.
Diffstat (limited to 'jobs/basejob.h')
-rw-r--r-- | jobs/basejob.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jobs/basejob.h b/jobs/basejob.h index e9e108c6..c03c914f 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -212,6 +212,14 @@ namespace QMatrixClient void addExpectedContentType(const QByteArray& contentType); void setExpectedContentTypes(const QByteArrayList& contentTypes); + /** Construct a URL out of baseUrl, path and query + * The function automatically adds '/' between baseUrl's path and + * \p path if necessary. The query component of \p baseUrl + * is ignored. + */ + static QUrl makeRequestUrl(QUrl baseUrl, const QString& path, + const QUrlQuery& query = {}); + virtual void beforeStart(const ConnectionData* connData); virtual void afterStart(const ConnectionData* connData, QNetworkReply* reply); |