Definition of HTTP responses.
- data Response = Response {}
- emptyResponse :: StatusCode sc => sc -> Response
- setStatusCode :: StatusCode sc => sc -> Response -> Response
- resCanHaveBody :: Response -> Bool
- isInformational :: StatusCode sc => sc -> Bool
- isSuccessful :: StatusCode sc => sc -> Bool
- isRedirection :: StatusCode sc => sc -> Bool
- isError :: StatusCode sc => sc -> Bool
- isClientError :: StatusCode sc => sc -> Bool
- isServerError :: StatusCode sc => sc -> Bool
Documentation
This is the definition of an HTTP response.
Response | |
|
Eq Response | |
Show Response | |
HasHeaders Response | |
ConvertSuccess Response Ascii | |
ConvertSuccess Response AsciiBuilder | |
ConvertAttempt Response Ascii | |
ConvertAttempt Response AsciiBuilder |
emptyResponse :: StatusCode sc => sc -> ResponseSource
Returns an HTTP/1.1 Response
with no header fields.
setStatusCode :: StatusCode sc => sc -> Response -> ResponseSource
sets the status code of setStatusCode
sc resres
to sc
.
resCanHaveBody :: Response -> BoolSource
isInformational :: StatusCode sc => sc -> BoolSource
returns isInformational
scTrue
iff sc
.
<
200
isSuccessful :: StatusCode sc => sc -> BoolSource
returns isSuccessful
scTrue
iff 200
.
<=
sc <
300
isRedirection :: StatusCode sc => sc -> BoolSource
returns isRedirection
scTrue
iff 300
.
<=
sc <
400
isClientError :: StatusCode sc => sc -> BoolSource
returns isClientError
scTrue
iff 400
.
<=
sc <
500
isServerError :: StatusCode sc => sc -> BoolSource
returns isServerError
scTrue
iff 500
.
<=
sc