Open jbfaden opened 1 year ago
It would be nice to set the User-Agent so that HAPI servers can filter requests made for testing from those where it's being used for science.
To set it in Python, it is something like:
USER_AGENT = 'hapibot-a/1.0; https://github.com/hapi-server/data-specification/wiki/hapi-bots.md#hapibot-a' headers= { "User-Agent" : USER_AGENT } x = requests.get(cS,headers=headers)
I'd suggest this would be an option in the **opts structure, like so:
agent= 'hapibot-z/1.0; https://github.com/hapi-server/data-specification/wiki/hapi-bots.md#hapibot-z' opts = {'logging': False, 'format': 'csv', 'usecache': True, 'useragent':agent} hapidata = hapiclient.hapi(server, dataset, parameters, start, stop, **opts)
It would be nice to set the User-Agent so that HAPI servers can filter requests made for testing from those where it's being used for science.
To set it in Python, it is something like:
I'd suggest this would be an option in the **opts structure, like so: