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

Change the api reference http blocks to curl calls

Open steve-chavez opened this issue 5 years ago • 1 comments

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)

steve-chavez avatar Aug 24 '20 13:08 steve-chavez

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?

wolfgangwalther avatar Nov 23 '20 10:11 wolfgangwalther

curl blocks have been available for a while now

steve-chavez avatar May 05 '23 03:05 steve-chavez