[QGIS-Developer] QgsBlockingNetworkRequest and PATCH method (Python)
Julien Cabieces
julien.cabieces at oslandia.com
Mon Jan 31 23:35:08 PST 2022
Hi
> Hi list -
>
> I have a Internet resource ("Miljøportalen", The Danish portal for
> environmental data:
> https://arealeditering-api.demo.miljoeportal.dk/swagger/index.html)
> where I would like to use the QgsBlockingNetworkRequest from a Python
> based plugin to access this resource.
>
> 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.
> 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/)
Regards,
Julien
More information about the QGIS-Developer
mailing list