typesense-python
typesense-python copied to clipboard
Support for additional request headers ?
Description
My cluster is behind a proxy & I need to include additional headers to reach out to it. This is not possible with the Python library. The only header being passed is the api key :
https://github.com/typesense/typesense-python/blob/5d1b7402dbc1131c5dc8dc5eae66d05f71d14311/src/typesense/api_call.py#L101
Expected Behavior
Client constructor should accept a new field :
self.client = Client({
'nodes': [...],
'api_key': '..',
'connection_timeout_seconds': 5,
'additional_headers': {
'X-QWE-RTY': 'foobarbaz'
}
})
Something similar is already implemented by the Javascript library : https://github.com/typesense/typesense-js/issues/79
Metadata
Typesense Version: 27.0.rc22
Python SDK Version: 0.21.0
You can take a look at #60 to verify if this matches your usecase
this is added in version 1.0.3