gchq / gaffer-tools

gaffer-tools is deprecated. Use https://github.com/gchq/gafferpy instead
Apache License 2.0
50 stars 29 forks source link

Gafferpy do not override requests default headers #899

Closed t92549 closed 3 years ago

t92549 commented 3 years ago

I think perhaps not overwriting requests' default headers and instead adding to them might make more sense:

https://github.com/gchq/gaffer-tools/blob/cc6d0439ce068142e201e8a48ed4756e0d49de63/python-shell/src/gafferpy/gaffer_connector_requests.py#L49-L50

This currently only happens when headers are provided to the GafferConnector constructor. The requests default headers add useful user agent information, and if someone really wanted to hide that they could just set conn._session.headers = None