HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebsb-http-chunked-0.0.0.4Haskell98

Data.ByteString.Builder.HTTP.Chunked

HTTP/1.1 chunked transfer encoding as defined in RFC 7230 Section 4.1

  • 2 values

Transform a builder such that it uses chunked HTTP transfer encoding.

Example4 expressions
:set -XOverloadedStringsimport Data.ByteString.Builder as Blet f = B.toLazyByteString . chunkedTransferEncoding . B.lazyByteStringf "data""004\r\ndata\r\n"
Example1 expression
f """"

Note: While for many inputs, the bytestring chunks that can be obtained from the output via toChunks . toLazyByteString each form a chunk in the sense of RFC 7230 Section 4.1, this correspondence doesn't hold in general.