| Safe Haskell | None |
|---|
Network.HPACK
- type ByteStream = ByteString
- type HeaderSet = [Header]
- data Context
- newContext :: Size -> IO Context
- data DecodeError
- type HPACKEncoding = Context -> HeaderSet -> IO (Context, ByteStream)
- type HPACKDecoding = Context -> ByteStream -> IO (Context, HeaderSet)
- encodeRequestHeader :: HPACKEncoding
- decodeRequestHeader :: HPACKDecoding
- encodeResponseHeader :: HPACKEncoding
- decodeResponseHeader :: HPACKDecoding
Type
type ByteStream = ByteStringSource
Byte stream in HTTP request/response.
newContext :: Size -> IO ContextSource
Creating a new Context.
The first argument is the size of HeaderTable.
data DecodeError Source
Errors for decoder.
Constructors
| IndexOverrun Index | Index is out of range |
| EosInTheMiddle | Eos appears in the middle of string |
| IllegalEos | Non-eos appears in the end of string |
| TooLongEos | Eos is more than 7 bits |
| EmptyEncodedString | Encoded string has no length |
| EmptyBlock | Header block is empty |
type HPACKEncoding = Context -> HeaderSet -> IO (Context, ByteStream)Source
type HPACKDecoding = Context -> ByteStream -> IO (Context, HeaderSet)Source
Request
encodeRequestHeader :: HPACKEncodingSource
Converting HeaderSet for HTTP request to the low level format.
decodeRequestHeader :: HPACKDecodingSource
Converting the low level format for HTTP request to HeaderSet.
DecodeError would be thrown.
Response
encodeResponseHeader :: HPACKEncodingSource
Converting HeaderSet for HTTP response to the low level format.
decodeResponseHeader :: HPACKDecodingSource
Converting the low level format for HTTP response to HeaderSet.
DecodeError would be thrown.