Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.0
-
None
-
Using Qt 5.2.0 64-bit on Debian
-
2c54d85bf70e078ab1dfb1465567512aded5cf9d
Description
var request = new XMLHttpRequest(); request.open("OPTIONS", resource.url) request.send()
Result:
Error: Unsupported HTTP method type
QTBUG-17963 has similar case with the difference that deleteResource is implemented as public method on QNetworkAccessManager while to support OPTIONS method one should use QNetworkAccessManager::sendCustomRequest as the documentation suggests:
This sendCustomRequest method provides means to send verbs other than the common ones provided via get() or post() etc., for instance sending an HTTP OPTIONS command.
Since the OPTIONS method is considered custom request and sendCustomRequest also takes a third optional argument, maybe the solution would not be to add another else if in qqmlxmlhttprequest.cpp but rather expose a new function for custom requests?
Or is this out of scope for QML? Should I just expose sendCustomRequest my self for use in QML?
Use case for this in my case would be to create Qt Quick only, Hypermedia client which need OPTIONS verb to get available options for some resource.