Skip to content

Allow adding custom headers to requests #357

@thislg

Description

@thislg

Description

The ability to set custom headers on Meilisearch\Http\Client requests would be a useful feature.

Basic example

I want to set the X-MS-USER-ID HTTP header, which can be used to identify the user making the request to Meilisearch Cloud endpoint with Analytics enabled.

Other

There are several ways of doing this. I think a solution without modifying interfaces in meilisearch-php (to preserve BC) would be to allow configuration of meilisearch.client service's http client and/or request factory parameters. I could always override meilisearch.client service but what do you think about adding parameters instead?

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