aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2020-12-10 01:53:04 +0100
committerTobias Fella <fella@posteo.de>2020-12-10 01:53:04 +0100
commit6ac7d7b77242b36d7fc52ea84a061464c71579c7 (patch)
tree05d4b3fa34bdb388681fe191f030a5ad7b92c340
parentf160c92d06446bd90b8ac4e1d238ecabb0c97651 (diff)
downloadlibquotient-6ac7d7b77242b36d7fc52ea84a061464c71579c7.tar.gz
libquotient-6ac7d7b77242b36d7fc52ea84a061464c71579c7.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.
-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;
}
}