http-kit-0.2.1: A low-level HTTP library

Safe HaskellNone

Network.HTTP.Toolkit.Header

Contents

Synopsis

Documentation

type Limit = IntSource

Message header size limit in bytes.

readMessageHeader :: Limit -> Connection -> IO (ByteString, [Header])Source

Read start-line and message headers from provided Connection (see RFC 2616, Section 4.1).

Throws:

defaultHeaderSizeLimit :: LimitSource

The default message header size limit of 65536 bytes (64 KB).

parseHeaderFields :: [ByteString] -> Maybe [Header]Source

Parse header fields according to RFC 2616, Section 4.2.

sendHeader :: (ByteString -> IO ()) -> ByteString -> [Header] -> IO ()Source

Send given start-line and message headers.

Note: The first argument to this function is used to send the data. For space efficiency it may be called multiple times.

Internals