| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Data.ByteString.Builder.HTTP.Chunked
Description
HTTP/1.1 chunked transfer encoding as defined in RFC 7230 Section 4.1
Synopsis
Documentation
chunkedTransferEncoding :: Builder -> Builder #
Transform a builder such that it uses chunked HTTP transfer encoding.
>>>:set -XOverloadedStrings>>>import Data.ByteString.Builder as B>>>let f = B.toLazyByteString . chunkedTransferEncoding . B.lazyByteString>>>f "data""004\r\ndata\r\n"
>>>f """"
Note: While for many inputs, the bytestring chunks that can be obtained from the output
via
each form a chunk in the sense
of RFC 7230 Section 4.1,
this correspondence doesn't hold in general.toChunks . toLazyByteString
chunkedTransferTerminator :: Builder #
The zero-length chunk 0\r\n\r\n signalling the termination of the data transfer.