Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for additional request headers ? #54

Open
brnkes opened this issue Jul 8, 2024 · 1 comment
Open

Support for additional request headers ? #54

brnkes opened this issue Jul 8, 2024 · 1 comment

Comments

@brnkes
Copy link

brnkes commented Jul 8, 2024

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 :

r = fn(url, headers={ApiCall.API_KEY_HEADER_NAME: self.config.api_key}, **kwargs)

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 : typesense/typesense-js#79

Metadata

Typesense Version: 27.0.rc22

Python SDK Version: 0.21.0

@tharropoulos
Copy link
Contributor

You can take a look at #60 to verify if this matches your usecase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants