[QGIS-Developer] QgsBlockingNetworkRequest and PATCH method (Python)

Richard Duivenvoorde rdmailings at duif.net
Fri Feb 4 00:00:27 PST 2022


On 2/1/22 08:35, Julien Cabieces wrote:

>> I can see, that QgsBlockingNetworkRequest Class supports methods GET,
>> PUT, POST, HEAD and DELETE. However, according to the documentation for
>> the resource, I have to use the "PATCH" method for updating existing
>> objects on the server
>>
>> Is this possible using the QgsBlockingNetworkRequest Class from
>> Python?
> 
> In this actual state no, because the doRequest method that you could
> have called with the PATCH method is private. So, you won't be able to call
> it directly, and you won't be able to inherit QgsBlockingNetworkRequest
> to call it either.

I'd say this is a nice FeatureRequest, as more and more web-services start to use this newish [0][1](1995) PATCH thing...

Maybe Ale is available (if you have some funding?)? I know he is known to fly around in that area of the code :-)

>> Or is there any other Python Class I can use for this purpose ??
> 
> I think one good solution is to use the request python framework (https://3.python-requests.org/)

Which I found out recently is packaged with Windows QGIS...(?) So 'safe' to use in QGIS... (though I would prefer to use QgsBlockingNetworkRequest....)

Regards,

Richard Duivenvoorde

[0] https://rubyonrails.org/2012/2/26/edge-rails-patch-is-the-new-primary-http-method-for-updates
[1] https://en.wikipedia.org/wiki/Patch_verb



More information about the QGIS-Developer mailing list