You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm currently working on a project using Supabase in C#, and I need to add a custom header to my requests. Additionally, I want to retrieve a specific header value from the response.
I've been able to make basic requests, but I'm not sure how to modify the request to include a custom header or how to access the headers from the response. Could anyone provide an example or guidance on how to achieve this in C#?
Describe the solution you'd like
I thinking like this query.GetHeaders().TryAdd("prefer", "count=exact");
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Supabase returns the total count of records in the response header like this:
Content-Range: 0-9/50
This allows us to get the total number of records without making a second API call, which is useful for implementing pagination in the UI with just a single request.
I'd like to be able to set the Prefer header to count=exact in my request and read the Content-Range header from the response. This would optimize the API usage for pagination purposes.
That makes sense, the first step could be to either just flat out provide full access over headers when requesting and getting the reponse, or wrap them nicely in various objects and setters, to avoid handling the API spec behind.
But I definitely see your use-case, seems like it just comes down to not supporting the full API yet.
That makes sense, the first step could be to either just flat out provide full access over headers when requesting and getting the reponse, or wrap them nicely in various objects and setters, to avoid handling the API spec behind.
But I definitely see your use-case, seems like it just comes down to not supporting the full API yet.
Actually that is not entirely true, I can see the (QueryOptions)[https://github.com/supabase-community/postgrest-csharp/blob/master/Postgrest/QueryOptions.cs] class handles these attributes.
It looks like it comes down to not being able to pass these on Select request, but only update, delete, insert and upsert.
Feature request
Is your feature request related to a problem? Please describe.
I'm currently working on a project using Supabase in C#, and I need to add a custom header to my requests. Additionally, I want to retrieve a specific header value from the response.
I've been able to make basic requests, but I'm not sure how to modify the request to include a custom header or how to access the headers from the response. Could anyone provide an example or guidance on how to achieve this in C#?
Describe the solution you'd like
I thinking like this
query.GetHeaders().TryAdd("prefer", "count=exact");
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: