Allow to pass extraHeaders to a path based MkColJob

We could specify the extra headers with a URL but not a simple path.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-07-08 15:14:18 +02:00 committed by Camila
parent e14ae806b6
commit 01f5501ad8
2 changed files with 7 additions and 0 deletions

View file

@ -122,6 +122,12 @@ MkColJob::MkColJob(AccountPtr account, const QString &path, QObject *parent)
{
}
MkColJob::MkColJob(AccountPtr account, const QString &path, const QMap<QByteArray, QByteArray> &extraHeaders, QObject *parent)
: AbstractNetworkJob(account, path, parent)
, _extraHeaders(extraHeaders)
{
}
MkColJob::MkColJob(AccountPtr account, const QUrl &url,
const QMap<QByteArray, QByteArray> &extraHeaders, QObject *parent)
: AbstractNetworkJob(account, QString(), parent)

View file

@ -253,6 +253,7 @@ class OWNCLOUDSYNC_EXPORT MkColJob : public AbstractNetworkJob
public:
explicit MkColJob(AccountPtr account, const QString &path, QObject *parent = nullptr);
explicit MkColJob(AccountPtr account, const QString &path, const QMap<QByteArray, QByteArray> &extraHeaders, QObject *parent = nullptr);
explicit MkColJob(AccountPtr account, const QUrl &url,
const QMap<QByteArray, QByteArray> &extraHeaders, QObject *parent = nullptr);
void start() override;