Closed mrl5 closed 3 weeks ago
ah, damn I just realized that with HTTP POST I should be using Content-Profile
instead of Accept-Profile
as per https://postgrest.org/en/v12/references/api/schemas.html#other-methods
curl -i -X POST -d '{"timeout":59}' -H "content-type: application/json" http://localhost:3000/rpc/foo
curl -i -H "Accept-Profile: worker" http://localhost:3000/rpc/baz
- curl -i -X POST -H "Accept-Profile: worker" http://localhost:3000/rpc/baz
+ curl -i -X POST -H "Content-Profile: worker" http://localhost:3000/rpc/baz
Description
For HTTP POST stored procedures (
/rpc
) ignores schema preference defined inAccept-Profile
header (ref: https://postgrest.org/en/v12/references/api/schemas.html#schemas). Interestingly this is not a case for HTTP GET.Environment
postgres:16.3
postgrest/postgrest:v12.0.3
Linux pc 6.3.11_p1-debian-sources #1 SMP PREEMPT_DYNAMIC Wed Dec 27 15:06:33 CET 2023 x86_64 GNU/Linux
Setup
docker-compose.yml
bootstrap:
run
Steps to reproduce vol.1
Expected
Actual
Steps to reproduce vol.2
lets change the schema order in
docker-compose.yml
kill
api
container and again runExpected
Actual