Return Location header only when using Prefer: return=header-only

This commit is contained in:
Laurence Isla
2022-06-24 12:53:27 -05:00
committed by GitHub
parent f7745e1569
commit 169547aee6
4 changed files with 39 additions and 30 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ instance ToAppliedHeader PreferResolution
--
-- From https://tools.ietf.org/html/rfc7240#section-4.2
data PreferRepresentation
= Full -- ^ Return the body plus the Location header(in case of POST).
= Full -- ^ Return the body.
| HeadersOnly -- ^ Return the Location header(in case of POST). This needs a SELECT privilege on the pk.
| None -- ^ Return nothing from the mutated data.
deriving Eq