0 | module TyTTP.HTTP.Producer.JSON
2 | import Data.Buffer.Ext
12 | -> Context me u v h1 s StringHeaders a b
13 | -> m $
Context me u v h1 s StringHeaders a (Publisher IO e Buffer)
15 | let bodyJson = encode j
16 | let stream : Publisher IO e Buffer = Stream.singleton $
fromString $
bodyJson
17 | pure $
{ response.body := stream
18 | , response.headers :=
19 | [ ("Content-Type", "application/json")
20 | , ("Content-Length", show $
length bodyJson)