From 0f92f2f35d55f2de545e8472c6b240c8fd0bb53f Mon Sep 17 00:00:00 2001 From: Felix Barz Date: Sun, 30 Jun 2019 20:43:03 +0200 Subject: Add custom verb support for WASM HTTP requests The QNetworkReply implementation for Qt for WebAssembly now supports usage of the QNetworkAccessManager::sendCustomRequest, making it possible to send requests with custom verbs. [ChangeLog][QtNetwork][QNetworkAccessManager] Fixed QNetworkAccessManager::sendCustomRequest for Qt For WebAssembly. Fixes: QTBUG-76775 Change-Id: I9394ffef110fce4ed2c877893631bedc7631f71e Reviewed-by: Lorn Potter --- src/network/access/qnetworkreplywasmimpl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/network/access/qnetworkreplywasmimpl.cpp') diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp index 9f6422a107..ee91dc20b3 100644 --- a/src/network/access/qnetworkreplywasmimpl.cpp +++ b/src/network/access/qnetworkreplywasmimpl.cpp @@ -236,6 +236,7 @@ QNetworkReplyWasmImpl::~QNetworkReplyWasmImpl() QByteArray QNetworkReplyWasmImpl::methodName() const { + const Q_D( QNetworkReplyWasmImpl); switch (operation()) { case QNetworkAccessManager::HeadOperation: return "HEAD"; @@ -247,6 +248,8 @@ QByteArray QNetworkReplyWasmImpl::methodName() const return "POST"; case QNetworkAccessManager::DeleteOperation: return "DELETE"; + case QNetworkAccessManager::CustomOperation: + return d->request.attribute(QNetworkRequest::CustomVerbAttribute).toByteArray(); default: break; } -- cgit v1.2.3