salvia-protocol-1.0.1: Salvia webserver protocol suite supporting URI, HTTP, Cookie and MIME.

Network.Protocol.Http.Data

Synopsis

Documentation

data Method Source

List of HTTP request methods.

Instances

data Version Source

HTTP protocol version.

Constructors

Version 

Fields

_major :: Int
 
_minor :: Int
 

newtype Headers Source

HTTP headers as mapping from keys to values.

Constructors

Headers 

Fields

unHeaders :: [(Key, Value)]
 

Instances

data Request Source

Request specific part of HTTP messages.

Constructors

Request 

Fields

__method :: Method
 
__uri :: String
 

Instances

data Response Source

Response specific part of HTTP messages.

Constructors

Response 

Fields

__status :: Status
 

Instances

data Http a Source

An HTTP message. The message body is *not* included.

Constructors

Http 

Instances

methods :: [Method]Source

All recognized method constructors as a list.

http10 :: VersionSource

Create HTTP 1.0 version.

http11 :: VersionSource

Create HTTP 1.1 version.

emptyHeaders :: HeadersSource

Create an empty set of headers.

emptyRequest :: Http RequestSource

Create an empty HTTP request message.

emptyResponse :: Http ResponseSource

Create an empty HTTP response message.

major :: Version :-> IntSource

Label to access the major part of the version.

minor :: Version :-> IntSource

Label to access the minor part of the version.

headers :: Http a :-> HeadersSource

Label to access the header of an HTTP message.

version :: Http a :-> VersionSource

Label to access the version part of an HTTP message.

headline :: Http a :-> aSource

Label to access the header line part of an HTTP message.

method :: Http Request :-> MethodSource

Label to access the method part of an HTTP request message.

uri :: Http Request :-> StringSource

Label to access the URI part of an HTTP request message.

asUri :: Http Request :-> UriSource

Label to access the URI part of an HTTP request message and access it as a true URI data type.

status :: Http Response :-> StatusSource

Label to access the status part of an HTTP response message.

normalizeHeader :: Key -> KeySource

Normalize the capitalization of an HTTP header key.

header :: Key -> Http a :-> Maybe ValueSource

Generic label to access an HTTP header field by key.