From a69da398584644daf975db58a3ff893d29d155eb Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 14 Nov 2025 20:56:47 -0500 Subject: Add TCG --- fig-web/src/Fig/Web/Utils.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fig-web/src/Fig/Web/Utils.hs') diff --git a/fig-web/src/Fig/Web/Utils.hs b/fig-web/src/Fig/Web/Utils.hs index 72782d9..9337b12 100644 --- a/fig-web/src/Fig/Web/Utils.hs +++ b/fig-web/src/Fig/Web/Utils.hs @@ -10,7 +10,7 @@ module Fig.Web.Utils , onGet, onPost, onPut, onDelete , status , queryParam, queryParamMaybe, formParam, formParamMaybe, pathParam - , header + , header, addHeader , respondBytes, respondText, respondJSON, respondHTMLText, respondHTML, redirect , WebsocketHandler , websocket @@ -145,6 +145,9 @@ header h = Sc.header (Text.L.fromStrict h) >>= \case Nothing -> pure Nothing Just t -> pure . Just $ Text.L.toStrict t +addHeader :: Text -> Text -> Sc.ActionM () +addHeader h v = Sc.addHeader (Text.L.fromStrict h) (Text.L.fromStrict v) + respondBytes :: ByteString -> Sc.ActionM () respondBytes = Sc.raw . BS.L.fromStrict -- cgit v1.2.3