From df52a028f97b7c742673908d127a63a9205b914d Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Fri, 17 Dec 2021 20:29:59 -0500 Subject: [PATCH] Don't assume return=minimal for GET/HEAD --- src/PostgREST/Request/ApiRequest.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PostgREST/Request/ApiRequest.hs b/src/PostgREST/Request/ApiRequest.hs index cd52719653..f8169c5082 100644 --- a/src/PostgREST/Request/ApiRequest.hs +++ b/src/PostgREST/Request/ApiRequest.hs @@ -195,7 +195,7 @@ userApiRequest conf@AppConfig{..} dbStructure req reqBody , iRange = ranges , iTopLevelRange = topLevelRange , iPayload = relevantPayload - , iPreferRepresentation = fromMaybe None preferRepresentation + , iPreferRepresentation = fromMaybe (if method `elem` ["GET", "HEAD"] then Full else None) preferRepresentation , iPreferParameters = preferParameters , iPreferCount = preferCount , iPreferResolution = preferResolution