postgrest-rs icon indicating copy to clipboard operation
postgrest-rs copied to clipboard

HTTP client independendent implementation

Open MatiasHiltunen opened this issue 1 year ago • 1 comments
trafficstars

Feature request

Is your feature request related to a problem? Please describe.

Postgrest is these days primarily used with supabase which default data format is json. Reqwest with features such as json can not be used on the code with the portgrest-rs as adding features to dependency's dependency is not possible if I'm not mistaken.

By not depending solely on reqwest it would allow couple of benefits:

  1. Less dependencies to manage and keep updated
  2. Allows code that use the crate to choose the HTTP client.

Describe the solution you'd like

That would allow usage of the same version of the reqwest as the project that uses this crate with additional features such as reqwest's json.

Preferable way would be to create generic implementation for the whatever http client there is and by that way reduce the amount of same libraries with different versions. For example I had to fork this nice code to only update reqwest and json-feature and use the crate through local lib to be able to use "some_resp.json::<T>()" in my code

Describe alternatives you've considered

Full supabase client implementation with supabase auth would be great alternative

MatiasHiltunen avatar Jul 05 '24 12:07 MatiasHiltunen