aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2020-12-10 01:53:04 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-12-10 09:44:11 +0100
commitff2cb9f8a3a3ba01c9881ee1b196c9397c91ee6d (patch)
tree765cb59c3977276359773b225b0de285e169d53d /lib
parente7c9ca9017eb68b1c17e352f3ee60df0e939aa5e (diff)
downloadlibquotient-ff2cb9f8a3a3ba01c9881ee1b196c9397c91ee6d.tar.gz
libquotient-ff2cb9f8a3a3ba01c9881ee1b196c9397c91ee6d.zip
Fix DELETE jobs with json data
DeleteDeviceJob requires authentication, but the JSON data is not added for DELETE requests. Since QNetworkAccessManager::deleteResource does not support body data, we need to send a custom request.
Diffstat (limited to 'lib')
-rw-r--r--lib/jobs/basejob.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 1f0e84ba..b757854a 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -324,7 +324,7 @@ void BaseJob::Private::sendRequest()
reply.reset(connection->nam()->put(req, requestData.source()));
break;
case HttpVerb::Delete:
- reply.reset(connection->nam()->deleteResource(req));
+ reply.reset(connection->nam()->sendCustomRequest(req, "DELETE", requestData.source()));
break;
}
}