Safe Haskell | Safe-Infered |
---|
HTTP library for HTTP server.
- receive :: Handle -> IO (Maybe Request)
- respond :: Handle -> Version -> Persist -> Response -> IO ()
- data Request
- reqMethod :: Request -> Method
- reqURI :: Request -> URI
- reqVersion :: Request -> Version
- reqFields :: Request -> Fields
- reqBody :: Request -> Maybe ByteString
- reqLength :: Request -> Integer
- data Response
- rspStatus :: Response -> Status
- rspFields :: Response -> Fields
- rspBody :: Response -> Maybe ByteString
- rspLength :: Response -> Maybe Integer
- rspLogMsg :: Response -> String
- makeResponse :: Status -> [(FieldKey, FieldValue)] -> Response
- makeResponse2 :: Status -> Maybe ByteString -> Maybe Integer -> [(FieldKey, FieldValue)] -> Response
- makeResponse3 :: Status -> Maybe ByteString -> Maybe Integer -> Fields -> Response
- class Comm a
- data Fields
- lookupField :: Comm a => FieldKey -> a -> Maybe FieldValue
- lookupField' :: FieldKey -> Fields -> Maybe FieldValue
- insertField :: Comm a => FieldKey -> FieldValue -> a -> a
- insertField' :: FieldKey -> FieldValue -> Fields -> Fields
- receiveFields :: Handle -> IO Fields
- fromFields :: Fields -> [(FieldKey, FieldValue)]
- module Network.Web.Params
Documentation
reqVersion :: Request -> VersionSource
HTTP version
reqBody :: Request -> Maybe ByteStringSource
Entity body if exists
rspBody :: Response -> Maybe ByteStringSource
makeResponse :: Status -> [(FieldKey, FieldValue)] -> ResponseSource
A function to make Response
.
makeResponse2 :: Status -> Maybe ByteString -> Maybe Integer -> [(FieldKey, FieldValue)] -> ResponseSource
A function to make Response
.
makeResponse3 :: Status -> Maybe ByteString -> Maybe Integer -> Fields -> ResponseSource
A function to make Response
.
lookupField :: Comm a => FieldKey -> a -> Maybe FieldValueSource
Looking up the HTTP field value.
lookupField' :: FieldKey -> Fields -> Maybe FieldValueSource
Looking up the HTTP field value.
insertField :: Comm a => FieldKey -> FieldValue -> a -> aSource
Inserting the HTTP field.
insertField' :: FieldKey -> FieldValue -> Fields -> FieldsSource
Inserting the HTTP field.
receiveFields :: Handle -> IO FieldsSource
Parsing HTTP header from Handle
.
This function is useful to parse CGI output.
fromFields :: Fields -> [(FieldKey, FieldValue)]Source
module Network.Web.Params