Skip to content

Http Client

Tomas Norkūnas edited this page Oct 17, 2024 · 1 revision

As Meilisearch client accepts any psr18 http client, the default configured one is psr18.http_client which is provided by the Symfony.

If you need to customize http client, you have two options:

  1. Decorate the psr18.http_client - this way your modifications will be applied automatically.
    Keep in mind that these modifications will also be applied when your app will do http calls in other places than meilisearch.

  2. Or you can register scoped http client, decorate it and then configure bundle to use it:

# config/packages/meilisearch.yaml
meilisearch:
    http_client: acme.http_client # service id of your http client