http2-0.0.0: HTTP/2.0 library including HPACK

Safe HaskellNone

Network.HPACK

Contents

Synopsis

Type

type ByteStream = ByteStringSource

Byte stream in HTTP request/response.

type HeaderSet = [Header]Source

Header set.

data Context Source

Context for encoding/decoding.

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

Request

encodeRequestHeader :: HeaderSet -> Context -> IO (ByteStream, Context)Source

Converting HeaderSet for HTTP request to the low level format.

decodeRequestHeader :: ByteStream -> Context -> IO (HeaderSet, Context)Source

Converting the low level format for HTTP request to HeaderSet. DecodeError would be thrown.

Response

encodeResponseHeader :: HeaderSet -> Context -> IO (ByteStream, Context)Source

Converting HeaderSet for HTTP response to the low level format.

decodeResponseHeader :: ByteStream -> Context -> IO (HeaderSet, Context)Source

Converting the low level format for HTTP response to HeaderSet. DecodeError would be thrown.