postgrest-docs
postgrest-docs copied to clipboard
Change the api reference http blocks to curl calls
This might be particularly helpful in the function section: http://postgrest.org/en/latest/api.html#stored-procedures
This:
curl http://localhost:3000/rpc/add_them \
-X POST -H "Content-Type: application/json" \
-d '{"a": 3,"b":2}'
Is more useful than:
POST /rpc/add_them HTTP/1.1
{ "a": 1, "b": 2 }
3
(Might also solve https://github.com/PostgREST/postgrest-docs/issues/149)
Or even better, as mentioned in https://github.com/PostgREST/postgrest/pull/1659#discussion_r528245119 - can we create some kind of demo server that might be connected to the docs in a way, where you can run those requests directly out of the docs against the demo server?
curl blocks have been available for a while now