From 404fcb6b2795d76c00eb69b500417c3b765e2c05 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 26 Jan 2017 10:32:27 -0500 Subject: [PATCH] Fix the plurality header docs for v0.4 (#32) --- admin.rst | 2 +- api.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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