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

Alessandro Pasotti apasotti at gmail.com
Fri Feb 4 01:10:36 PST 2022


Hi,

I think PATCH would be a nice addition and it's not difficult to implement.

Kind regards.



On Fri, Feb 4, 2022 at 9:00 AM Richard Duivenvoorde <rdmailings at duif.net>
wrote:

> 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
>
>

-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220204/c2df2a21/attachment.html>


More information about the QGIS-Developer mailing list