Lucu-0.1: HTTP Daemonic LibraryContentsIndex
Network.HTTP.Lucu.Response
Description
Definition of things related on HTTP response.
Synopsis
data StatusCode
= Continue
| SwitchingProtocols
| Processing
| Ok
| Created
| Accepted
| NonAuthoritativeInformation
| NoContent
| ResetContent
| PartialContent
| MultiStatus
| MultipleChoices
| MovedPermanently
| Found
| SeeOther
| NotModified
| UseProxy
| TemporaryRedirect
| BadRequest
| Unauthorized
| PaymentRequired
| Forbidden
| NotFound
| MethodNotAllowed
| NotAcceptable
| ProxyAuthenticationRequired
| RequestTimeout
| Conflict
| Gone
| LengthRequired
| PreconditionFailed
| RequestEntityTooLarge
| RequestURITooLarge
| UnsupportedMediaType
| RequestRangeNotSatisfiable
| ExpectationFailed
| UnprocessableEntitiy
| Locked
| FailedDependency
| InternalServerError
| NotImplemented
| BadGateway
| ServiceUnavailable
| GatewayTimeout
| HttpVersionNotSupported
| InsufficientStorage
data Response = Response {
resVersion :: !HttpVersion
resStatus :: !StatusCode
resHeaders :: !Headers
}
hPutResponse :: Handle -> Response -> IO ()
isInformational :: StatusCode -> Bool
isSuccessful :: StatusCode -> Bool
isRedirection :: StatusCode -> Bool
isError :: StatusCode -> Bool
isClientError :: StatusCode -> Bool
isServerError :: StatusCode -> Bool
statusCode :: StatusCode -> (#Int, ByteString#)
Documentation
data StatusCode
This is the definition of HTTP status code. Network.HTTP.Lucu.Resource.setStatus accepts these named statuses so you don't have to memorize, for instance, that "Gateway Timeout" is 504.
Constructors
Continue
SwitchingProtocols
Processing
Ok
Created
Accepted
NonAuthoritativeInformation
NoContent
ResetContent
PartialContent
MultiStatus
MultipleChoices
MovedPermanently
Found
SeeOther
NotModified
UseProxy
TemporaryRedirect
BadRequest
Unauthorized
PaymentRequired
Forbidden
NotFound
MethodNotAllowed
NotAcceptable
ProxyAuthenticationRequired
RequestTimeout
Conflict
Gone
LengthRequired
PreconditionFailed
RequestEntityTooLarge
RequestURITooLarge
UnsupportedMediaType
RequestRangeNotSatisfiable
ExpectationFailed
UnprocessableEntitiy
Locked
FailedDependency
InternalServerError
NotImplemented
BadGateway
ServiceUnavailable
GatewayTimeout
HttpVersionNotSupported
InsufficientStorage
show/hide Instances
data Response
Constructors
Response
resVersion :: !HttpVersion
resStatus :: !StatusCode
resHeaders :: !Headers
show/hide Instances
Eq Response
Show Response
HasHeaders Response
hPutResponse :: Handle -> Response -> IO ()
isInformational :: StatusCode -> Bool
isInformational sc is True iff sc < 200.
isSuccessful :: StatusCode -> Bool
isSuccessful sc is True iff 200 <= sc < 300.
isRedirection :: StatusCode -> Bool
isRedirection sc is True iff 300 <= sc < 400.
isError :: StatusCode -> Bool
isError sc is True iff 400 <= sc
isClientError :: StatusCode -> Bool
isClientError sc is True iff 400 <= sc < 500.
isServerError :: StatusCode -> Bool
isServerError sc is True iff 500 <= sc.
statusCode :: StatusCode -> (#Int, ByteString#)
statusCode sc returns an unboxed tuple of numeric and textual representation of sc.
Produced by Haddock version 2.1.0