HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

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.