Closed ghtmtt closed 3 years ago
QgsNetworkAccessManager is more suitable to use within QGIS because it handles all the user settings (like proxy). Here a ode snippet as prototype:
QgsNetworkAccessManager
network_request = QNetworkRequest(QUrl('http:/....')) reply = QgsNetworkAccessManager.instance().blockingGet(network_request) assert reply.error() == QNetworkReply.NoError, reply.errorString() return json.loads(reply_content.data().decode())
fixed by #1
QgsNetworkAccessManager
is more suitable to use within QGIS because it handles all the user settings (like proxy). Here a ode snippet as prototype: