]> gitweb @ CieloNegro.org - Lucu.git/blob - Network/HTTP/Lucu/StatusCode.hs
issue #20
[Lucu.git] / Network / HTTP / Lucu / StatusCode.hs
1 {-# LANGUAGE
2     OverloadedStrings
3   , QuasiQuotes
4   #-}
5 -- |Definition of HTTP status code.
6 -- 'Network.HTTP.Lucu.Resource.setStatus' accepts these named status
7 -- codes so you don't have to memorize that, say, \"Gateway Timeout\"
8 -- is 504.
9 module Network.HTTP.Lucu.StatusCode
10     ( -- * Informational
11       Continue(..)
12     , SwitchingProtocols(..)
13     , Processing(..)
14
15       -- * Successful
16     , OK(..)
17     , Created(..)
18     , Accepted(..)
19     , NonAuthoritativeInformation(..)
20     , NoContent(..)
21     , ResetContent(..)
22     , PartialContent(..)
23     , MultiStatus(..)
24     , AlreadyReported(..)
25     , IMUsed(..)
26
27       -- * Redirection
28     , MultipleChoices(..)
29     , MovedPermanently(..)
30     , Found(..)
31     , SeeOther(..)
32     , NotModified(..)
33     , UseProxy(..)
34     , TemporaryRedirect(..)
35
36       -- * Client Error
37     , BadRequest(..)
38     , Unauthorized(..)
39     , PaymentRequired(..)
40     , Forbidden(..)
41     , NotFound(..)
42     , MethodNotAllowed(..)
43     , NotAcceptable(..)
44     , ProxyAuthenticationRequired(..)
45     , RequestTimeout(..)
46     , Conflict(..)
47     , Gone(..)
48     , LengthRequired(..)
49     , PreconditionFailed(..)
50     , RequestEntityTooLarge(..)
51     , RequestURITooLarge(..)
52     , UnsupportedMediaType(..)
53     , RequestRangeNotSatisfiable(..)
54     , ExpectationFailed(..)
55     , UnprocessableEntity(..)
56     , Locked(..)
57     , FailedDependency(..)
58     , UpgradeRequired(..)
59
60       -- * Server Error
61     , InternalServerError(..)
62     , NotImplemented(..)
63     , BadGateway(..)
64     , ServiceUnavailable(..)
65     , GatewayTimeout(..)
66     , HTTPVersionNotSupported(..)
67     , VariantAlsoNegotiates(..)
68     , InsufficientStorage(..)
69     , LoopDetected(..)
70     , NotExtended(..)
71     )
72     where
73 import Network.HTTP.Lucu.StatusCode.Internal
74
75 [statusCodes|
76 100 Continue
77 101 Switching Protocols
78 102 Processing
79
80 200 OK
81 201 Created
82 202 Accepted
83 203 Non Authoritative Information
84 204 No Content
85 205 Reset Content
86 206 Partial Content
87 207 Multi Status
88 208 Already Reported
89 226 IM Used
90
91 300 Multiple Choices
92 301 Moved Permanently
93 302 Found
94 303 See Other
95 304 Not Modified
96 305 Use Proxy
97 307 Temporary Redirect
98
99 400 Bad Request
100 401 Unauthorized
101 402 Payment Required
102 403 Forbidden
103 404 Not Found
104 405 Method Not Allowed
105 406 Not Acceptable
106 407 Proxy Authentication Required
107 408 Request Timeout
108 409 Conflict
109 410 Gone
110 411 Length Required
111 412 Precondition Failed
112 413 Request Entity Too Large
113 414 Request URI Too Large
114 415 Unsupported Media Type
115 416 Request Range Not Satisfiable
116 417 Expectation Failed
117 422 Unprocessable Entity
118 423 Locked
119 424 Failed Dependency
120 426 Upgrade Required
121
122 500 Internal Server Error
123 501 Not Implemented
124 502 Bad Gateway
125 503 Service Unavailable
126 504 Gateway Timeout
127 505 HTTP Version Not Supported
128 506 Variant Also Negotiates
129 507 Insufficient Storage
130 508 Loop Detected
131 510 Not Extended
132 |]