From c388c5e82c3df5d8ae63b523fea012c23e37410a Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Thu, 6 Jan 2022 13:02:57 +0100 Subject: [PATCH] Add HeadNoContent to Servant.API.Verbs (#1502) As the head method isn't allowed to contain any response body, no general Head Verb is added. (This may easily lead to wrong usages...) (https://httpwg.org/specs/rfc7231.html#HEAD) --- servant/src/Servant/API/Verbs.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servant/src/Servant/API/Verbs.hs b/servant/src/Servant/API/Verbs.hs index 9ae1c2fd..e7115d5a 100644 --- a/servant/src/Servant/API/Verbs.hs +++ b/servant/src/Servant/API/Verbs.hs @@ -128,7 +128,8 @@ type DeleteNoContent = NoContentVerb 'DELETE type PatchNoContent = NoContentVerb 'PATCH -- | 'PUT' with 204 status code. type PutNoContent = NoContentVerb 'PUT - +-- | 'HEAD' with 204 status code. +type HeadNoContent = NoContentVerb 'HEAD -- ** 205 Reset Content --