Portability | |
---|---|
Stability | provisional |
Maintainer | diatchki@galois.com |
Safe Haskell | None |
- data StatusCode
- = Continue
- | SwitchingProtocols
- | OK
- | Created
- | Accepted
- | NonAuthoritativeInformation
- | NoContent
- | ResetContent
- | PartialContent
- | MultipleChoices
- | MovedPermanently
- | Found
- | SeeOther
- | NotModified
- | UseProxy
- | TemporaryRedirect
- | BadRequest
- | Unauthorized
- | PaymentRequired
- | Forbidden
- | NotFound
- | MethodNotAllowed
- | NotAcceptable
- | ProxyAuthenticationRequired
- | RequestTimeout
- | Conflict
- | Gone
- | LengthRequired
- | PreconditionFailed
- | RequestEntityTooLarge
- | RequestURITooLong
- | UnsupportedMediaType
- | RequestedRangeNotSatisfiable
- | ExpectationFailed
- | InternalServerError
- | NotImplemented
- | BadGateway
- | ServiceUnavailable
- | GatewayTimeout
- | HTTPVersionNotSupported
- err_response :: BufferType a => StatusCode -> Response a
- respond :: BufferType a => StatusCode -> Response a
- reason :: StatusCode -> String
- statusCodeTriplet :: StatusCode -> (Int, Int, Int)
Documentation
data StatusCode Source
HTTP/1.1 status codes
Continue | 100 |
SwitchingProtocols | 101 |
OK | 200 |
Created | 201 |
Accepted | 202 |
NonAuthoritativeInformation | 203 |
NoContent | 204 |
ResetContent | 205 |
PartialContent | 206 |
MultipleChoices | 300 |
MovedPermanently | 301 |
Found | 302 |
SeeOther | 303 |
NotModified | 304 |
UseProxy | 305 |
TemporaryRedirect | 307 |
BadRequest | 400 |
Unauthorized | |
PaymentRequired | 402 |
Forbidden | 403 |
NotFound | 404 |
MethodNotAllowed | 405 |
NotAcceptable | 406 |
ProxyAuthenticationRequired | 407 |
RequestTimeout | 408 |
Conflict | 409 |
Gone | 410 |
LengthRequired | 411 |
PreconditionFailed | 412 |
RequestEntityTooLarge | 413 |
RequestURITooLong | 414 |
UnsupportedMediaType | 415 |
RequestedRangeNotSatisfiable | 416 |
ExpectationFailed | 417 |
InternalServerError | 500 |
NotImplemented | 501 |
BadGateway | 502 |
ServiceUnavailable | 503 |
GatewayTimeout | 504 |
HTTPVersionNotSupported | 505 |
err_response :: BufferType a => StatusCode -> Response aSource
Make a simple response with the given status and body. Intended to be used for (bad) errors. Adds a close header.
respond :: BufferType a => StatusCode -> Response aSource
Make a simple response with the given status and body. No headers or body.
reason :: StatusCode -> StringSource
A brief description of what happend.
statusCodeTriplet :: StatusCode -> (Int, Int, Int)Source