Allow the creation of a `Client` without any API Key
irevoire opened this issue · 3 comments
Currently, we can’t create a Client
without any API Key
.
But when you’re using meilisearch in development you can totally launch your instance without any API Key
.
There is no reason to not support that.
Since we introduced the Authentication: Bearer {api_key}
header, sending an empty api_key
doesn't work anymore, which means it's impossible to use this SDK without an API key.
What would the default behavior be for instantiating the client in regards to the api_key field on the Client struct be?
I might be able to take this issue.
I think we should change the Client
struct to take an Option<String>
for the API key.
And then, for every request, when we send a request, we check if an API key is defined, and if there is none, we don't send the Authorization
field at all.
alright, I'll take this.