[QGIS-Developer] Do we have a User-Agent string for QGIS

Richard Duivenvoorde rdmailings at duif.net
Sun Apr 8 05:38:24 PDT 2018


Hi,

Being busy with a Nominatim Locator Filter plugin, which retrieves
geocoder results from the Nominatim service, I read [0] in the Usage
Policy that the project asks to provide a proper User-Agent in the
headers. Same

My question here:
- do we already have a 'QGIS-Desktop' User-Agent string?
I read that the tile services (we use the xyz tiles), also ask that [1],
so we probably (should) have?

You can put a lot of info in it [2], but I could just add a plugin
string like: "QGIS-Nominatim-Locator-Plugin".

OR would it be better to do it project wide: like there would be a
'iface.getUserAgentString()'
which could create much more interesting User-Agent like:
"QGIS/3.1 (x86_64 GNU/Linux, nl, Qt 5.9.2, GDAL 2.2.4)"
Or so...

Mmm, now thinking about it, it is probably better if I just use my own
User-Agent for a plugin, then when the plugin 'misbehaves', it is not
the QGIS-project that is blamed for it?

Or is is better to have one 'face' to the rest of the world.

Anybody?

Regards,

Richard Duivenvoorde



[0] https://operations.osmfoundation.org/policies/nominatim/
[1] https://operations.osmfoundation.org/policies/tiles/
[2] https://en.wikipedia.org/wiki/User_agent


More information about the QGIS-Developer mailing list