Re: [QGIS-Developer] HTTP POST multipart/form-data using PyQGIS

2023-09-12 Thread Julien Cabieces via QGIS-Developer


Hi

You can use QgsNetworkAccessManager::blockingPost that take an
authentication id and will use the proxy settings configured in QGIS.

If you want to make it non blocking, you can add it to a QgsTask and
execute it with QgsTaskManager.

Regards,
Julien

> Hello,
>
> I'm working on a QGIS plugin to upload images to an instance (STAC)
> via a REST API.
>
> I've found some examples
> (https://lists.osgeo.org/pipermail/qgis-developer/2022-January/064437.html)
> but they don't use the PyQGIS API, whereas I need support for
> authentication configurations and proxy settings.
>
> Is this currently possible?
>
>
> Regards,
> julien
>
> [2. text/vcard; julien_moura.vcf]...
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 

Julien Cabieces
Senior Developer at Oslandia
julien.cabie...@oslandia.com
09.72.52.52.76
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] HTTP POST multipart/form-data using PyQGIS

2023-09-11 Thread Julien Moura via QGIS-Developer

Hello,

I'm working on a QGIS plugin to upload images to an instance (STAC) via 
a REST API.


I've found some examples 
(https://lists.osgeo.org/pipermail/qgis-developer/2022-January/064437.html) 
but they don't use the PyQGIS API, whereas I need support for 
authentication configurations and proxy settings.


Is this currently possible?


Regards,
julien
BEGIN:VCARD
VERSION:4.0
EMAIL;PREF=1:julien.mo...@oslandia.com
EMAIL:juli...@oslandia.com
FN:Julien Moura
NICKNAME:jmo
ORG:Oslandia;
TITLE:Consultant - Ingénieur développeur
N:Moura;Julien;;;
ADR:;;France
URL;VALUE=URL:https://static.geotribu.fr
X-MOZILLA-HTML;VALUE=BOOLEAN:TRUE
UID:c6b195b1-5100-402f-bb73-b312bb7289c0
END:VCARD
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer