dart_algolia
dart_algolia copied to clipboard
Allow support for custom Http client
Is your feature request related to a problem? Please describe. We use a custom http client in our project for things like performance metrics and analysis and would like to be able to use it with our Algolia query too.
Describe the solution you'd like right now you use the standard http.post method from the http package, that method is actually a shortcut for a call to Client().post from the same package. The same is true for the others method of the package. Adding an optional parameter for a custom Client to method like getObjects and replacing call to http.post by a call to this custom client.post when the custom client is available would likely solve this problem.
Describe alternatives you've considered We tried to use our current performance monitoring by encapsulating our call to this library in it but we haven't managed yet to have functional traces on Firebase Performance for example, that's why we decided to ask for this feature. It also had the issue of partial code duplication between our custom Http Client and this encapsulation.