-
Notifications
You must be signed in to change notification settings - Fork 164
Feature request: Allow for header arguments to be passed in query too #565
Comments
This is also a problem for embedded devices(like SIM modules) that only support GET/POST methods. For this case perhaps a This is all part of the same problem(clients with incomplete HTTP support) so these special parameters could be enabled through a config option. |
I think those cases are so special, that I wouldn't put them into postgrest itself. What about creating some nginx configuration examples for how to do stuff like this on the reverse proxy level? People could then customize what kind of headers their clients support and add the respective things to their URL parsing. |
There are lots of Arduino use cases out there that we currently don't support. Putting a tutorial like "you need Nginx plus custom config to make this work" is no good. Additionally there's GIS software that can't use headers as mentioned on PostgREST/postgrest#223 (comment). And there are lot of great things we can do on the GIS space too(as I put on this example). |
A tutorial like this would be a great thing. I understand that there are a lot of deficient clients. But each of those clients has their own deficiencies. I don't think we should try to support them all. Instead we should focus on doing one thing well - and that's exposing a RESTful api. Reverse proxies are made for those kind of things. If we put up a configuration example for nginx that includes all those |
PostgREST/postgrest#1735 could have been done by a proxy too yet we still added it, this is a similar use case. That being said, since we have other pressing issues this can be done as a how-to("Supporting clients with incomplete HTTP support") for now. So moving it to docs. |
Problem:
When using software that doesn't allow to specify HTTP headers (stata, excel, etc.), users can't get data from PostgREST.
Solution:
Allow passing these arguments also as query parameters.
Authorization: Bearer <token>
could be also passwed as?token=<token>
, similarily withAccept: <format>
as?format=<format>
The text was updated successfully, but these errors were encountered: