diff --git a/admin.rst b/admin.rst index 751830018..aec3d6c39 100644 --- a/admin.rst +++ b/admin.rst @@ -248,7 +248,7 @@ As discussed in `Singular or Plural`_, there are no special URL forms for singul .. code:: http GET /people?id=eq.1 - Prefer: plurality=singular + Accept: application/vnd.pgrst.object+json This allows compound primary keys and makes the intent for singular response independent of a URL convention. However for any table which uses a simple primary key you can use Nginx to simulate the familiar URL convention. diff --git a/api.rst b/api.rst index f0f3af22a..6ec65039f 100644 --- a/api.rst +++ b/api.rst @@ -218,12 +218,12 @@ By default PostgREST returns all JSON results in an array, even when there is on { "id": 1 } ] -This can be inconvenient for client code. To return the first result as an object unenclosed by an array, Include a Prefer request header +This can be inconvenient for client code. To return the first result as an object unenclosed by an array, specify :code:`vnd.pgrst.object` as part of the :code:`Accept` header .. code:: http GET /items?id=eq.1 HTTP/1.1 - Prefer: plurality=singular + Accept: application/vnd.pgrst.object+json This returns