mohws-0.2.1.7: Modular Haskell Web Server
Safe HaskellNone
LanguageHaskell98

Network.MoHWS.HTTP.Header

Synopsis

Documentation

data Group Source #

Instances

Instances details
Show Group Source # 
Instance details

Defined in Network.MoHWS.HTTP.Header

Methods

showsPrec :: Int -> Group -> ShowS #

show :: Group -> String #

showList :: [Group] -> ShowS #

HasHeaders Group Source # 
Instance details

Defined in Network.MoHWS.HTTP.Header

Methods

getHeaders :: Group -> [Header] #

setHeaders :: Group -> [Header] -> Group #

group :: [T] -> Group Source #

setGroup :: HasHeaders x => x -> Group -> x Source #

list :: HasHeaders x => x -> [T] Source #

modifyMany :: HasHeaders x => ([T] -> [T]) -> x -> x Source #

type T = Header Source #

data Header #

The Header data type pairs header names & values.

Constructors

Header HeaderName String 

Instances

Instances details
Show Header 
Instance details

Defined in Network.HTTP.Headers

data HeaderName #

HTTP HeaderName type, a Haskell data constructor for each specification-defined header, prefixed with Hdr and CamelCased, (i.e., eliding the - in the process.) Should you require using a custom header, there's the HdrCustom constructor which takes a String argument.

Encoding HTTP header names differently, as Strings perhaps, is an equally fine choice..no decidedly clear winner, but let's stick with data constructors here.

Instances

Instances details
Eq HeaderName 
Instance details

Defined in Network.HTTP.Headers

Show HeaderName 
Instance details

Defined in Network.HTTP.Headers

class HasHeaders x #

HasHeaders is a type class for types containing HTTP headers, allowing you to write overloaded header manipulation functions for both Request and Response data types, for instance.

Minimal complete definition

getHeaders, setHeaders

Instances

Instances details
HasHeaders Group Source # 
Instance details

Defined in Network.MoHWS.HTTP.Header

Methods

getHeaders :: Group -> [Header] #

setHeaders :: Group -> [Header] -> Group #

HasHeaders (Request a) 
Instance details

Defined in Network.HTTP.Base

Methods

getHeaders :: Request a -> [Header] #

setHeaders :: Request a -> [Header] -> Request a #

HasHeaders (Response a) 
Instance details

Defined in Network.HTTP.Base

Methods

getHeaders :: Response a -> [Header] #

setHeaders :: Response a -> [Header] -> Response a #

HasHeaders (T body) Source # 
Instance details

Defined in Network.MoHWS.HTTP.Request

Methods

getHeaders :: T body -> [Header] #

setHeaders :: T body -> [Header] -> T body #

HasHeaders (T body) Source # 
Instance details

Defined in Network.MoHWS.HTTP.Response

Methods

getHeaders :: T body -> [Header] #

setHeaders :: T body -> [Header] -> T body #

Header parsing

Header manipulation

insert :: HasHeaders a => Name -> String -> a -> a Source #

replace :: HasHeaders a => Name -> String -> a -> a Source #

insertMany :: HasHeaders a => [T] -> a -> a Source #

Constructing headers

Getting values of specific headers