| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Network.Types
Contents
Synopsis
- data Method
- = GET
- | HEAD
- | POST
- | PUT
- | DELETE
- | TRACE
- | OPTIONS
- | CONNECT
- | EXTENSIONMETHOD ByteString
- data HttpVersion = HttpVersion {}
- http10 :: HttpVersion
- http11 :: HttpVersion
- data Header
- data RequestUri
- data Request = Request {
- rqMethod :: Method
- rqUri :: RequestUri
- rqVersion :: HttpVersion
- rqHeaders :: [(ByteString, ByteString)]
- rqBody :: ByteString
- data Response = Response {
- rpCode :: Int
- rpHeaders :: [(ByteString, ByteString)]
- rpVersion :: HttpVersion
- rpMessage :: ByteString
- data URI = URI {}
- data URIAuth = URIAuth {
- uriUserInfo :: String
- uriRegName :: String
- uriPort :: String
- data HttpError = InvalidRequestError {}
HTTP Types
HTTP Methods
Constructors
| GET | |
| HEAD | |
| POST | |
| PUT | |
| DELETE | |
| TRACE | |
| OPTIONS | |
| CONNECT | |
| EXTENSIONMETHOD ByteString |
data HttpVersion #
HTTP Version holds major and minor numbers.
Constructors
| HttpVersion | |
Instances
| Eq HttpVersion # | |
Defined in Network.Types | |
| Show HttpVersion # | |
Defined in Network.Types Methods showsPrec :: Int -> HttpVersion -> ShowS # show :: HttpVersion -> String # showList :: [HttpVersion] -> ShowS # | |
http10 :: HttpVersion #
HTTP 1.0
http11 :: HttpVersion #
HTTP 1.1
data RequestUri #
Constructors
| Asterisk | like in OPTIONS * HTTP/1.1 |
| AbsoluteUri URI | commonly used in proxy servers |
| AbsolutePath ByteString | like /asd.cgi |
| RelativeRef URI | with a query part like /asd.cgi?foo=bar |
| Authority (Maybe URIAuth) | Just the authority part |
Instances
| Eq RequestUri # | |
Defined in Network.Types | |
| Show RequestUri # | |
Defined in Network.Types Methods showsPrec :: Int -> RequestUri -> ShowS # show :: RequestUri -> String # showList :: [RequestUri] -> ShowS # | |
Constructors
| Request | |
Fields
| |
Constructors
| Response | |
Fields
| |
Constructors
| URI | |
Constructors
| URIAuth | |
Fields
| |
Misc Types
HTTP error.
Constructors
| InvalidRequestError | |
Fields | |
Instances
| Eq HttpError # | |
| Show HttpError # | |
| Exception HttpError # | |
Defined in Network.Types Methods toException :: HttpError -> SomeException # fromException :: SomeException -> Maybe HttpError # displayException :: HttpError -> String # | |