Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Http.Types
Synopsis
- data Request = Request {
- requestLine :: !RequestLine
- headers :: !Headers
- data RequestLine = RequestLine {}
- data Response = Response {
- statusLine :: !StatusLine
- headers :: !Headers
- data StatusLine = StatusLine {
- statusCode :: !Word16
- statusReason :: !Text
- data Headers
- data Header = Header {}
- data LookupException
- data Bodied a = Bodied {}
Request
The request line and the request headers.
Constructors
Request | |
Fields
|
data RequestLine Source #
An HTTP request line
Constructors
RequestLine | |
Instances
Show RequestLine Source # | |
Defined in Http.Request Methods showsPrec :: Int -> RequestLine -> ShowS # show :: RequestLine -> String # showList :: [RequestLine] -> ShowS # | |
Eq RequestLine Source # | |
Defined in Http.Request |
Response
The response status line and the response headers.
Constructors
Response | |
Fields
|
data StatusLine Source #
Constructors
StatusLine | |
Fields
|
Instances
Show StatusLine Source # | |
Defined in Http.Response Methods showsPrec :: Int -> StatusLine -> ShowS # show :: StatusLine -> String # showList :: [StatusLine] -> ShowS # | |
Eq StatusLine Source # | |
Defined in Http.Response |
Header
Collection of HTTP headers. Supports case-insensitive lookup. This is intended to be used for small collections of headers. Expect degraded performance if this is used for collections of more than 128 headers.
This preserves the original order of the headers and the original case of the header names.
An HTTP header. This type does not enforce a restricted character set. If, for example, the user creates a header whose key has a colon character, the resulting request will be malformed.
data LookupException Source #
Many headers cannot appear more than once. This is part of
the return type for lookup
, and it helps us track whether the
lookup failure was the result of something that might be expected
(the header was Missing
) or something that is definitely a mistake
(the header was duplicated).
Instances
Show LookupException Source # | |
Defined in Http.Headers Methods showsPrec :: Int -> LookupException -> ShowS # show :: LookupException -> String # showList :: [LookupException] -> ShowS # | |
Eq LookupException Source # | |
Defined in Http.Headers Methods (==) :: LookupException -> LookupException -> Bool # (/=) :: LookupException -> LookupException -> Bool # |