Skip to content

Support for additional request headers ? #54

Closed
@brnkes

Description

@brnkes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions