From 6bb9f8aac86f7ccd566bf88e68d2fa3720dc417b Mon Sep 17 00:00:00 2001 From: Nilesh Date: Tue, 25 Jan 2022 22:40:36 +0000 Subject: [PATCH 1/2] Improving docs for setting response headers like content-type [I ran into a gotcha](https://github.com/PostgREST/postgrest/issues/2138). Improving docs so that others can avoid this. My first PR in this project, and I haven't tested the generated docs. Feel free to discard if it's not appropriate or not done correctly. --- api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.rst b/api.rst index 2e39e0178..d831e8fb2 100644 --- a/api.rst +++ b/api.rst @@ -2509,7 +2509,7 @@ Notice that the variable should be set to an *array* of single-key objects rathe .. note:: - PostgREST provided headers such as ``Content-Type``, ``Location``, etc. can be overriden this way. + PostgREST provided headers such as ``Content-Type``, ``Location``, etc. can be overriden this way. Note that irrespective of overridden ``Content-Type`` response header, the content will still be converted to JSON, unless you also set :ref:`raw_media_types` to something like ``text/html``. .. _pre_req_headers: From 9a36860e36bee8aaf58720b7c59d6cf26d4bc134 Mon Sep 17 00:00:00 2001 From: Nilesh Date: Thu, 27 Jan 2022 22:38:47 +0000 Subject: [PATCH 2/2] Fixed link in api.rst Co-authored-by: Steve Chavez --- api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.rst b/api.rst index d831e8fb2..6367d4a3b 100644 --- a/api.rst +++ b/api.rst @@ -2509,7 +2509,7 @@ Notice that the variable should be set to an *array* of single-key objects rathe .. note:: - PostgREST provided headers such as ``Content-Type``, ``Location``, etc. can be overriden this way. Note that irrespective of overridden ``Content-Type`` response header, the content will still be converted to JSON, unless you also set :ref:`raw_media_types` to something like ``text/html``. + PostgREST provided headers such as ``Content-Type``, ``Location``, etc. can be overriden this way. Note that irrespective of overridden ``Content-Type`` response header, the content will still be converted to JSON, unless you also set :ref:`raw-media-types` to something like ``text/html``. .. _pre_req_headers: