HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

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.