Project: QGIS

Version: 3.6.0

Feature: Blocking (non-async) network requests

New PyQGIS API has been added for performing SAFE blocking requests. It is thread safe and has full support for QGIS proxy and authentication settings.

reply = QgsNetworkAccessManager.blockingGet(...)
reply = QgsNetworkAccessManager.blockingPut(...)

This API should be used whenever a blocking network request is required. Unlike implementations which rely on QApplication::processEvents() or creation of a QEventLoop, this class is completely thread safe and can be used on either the main thread or background threads without issue.

Redirects are automatically handled by the class.

This feature was developed by Nyall Dawson (North Road)