1 | String formInternalError() {↵ | | 1 | String formCreated() {↵
|
2 | return formError("500 Internal server error", "Server broke");↵ | | 2 | return formError("201 Created", "Object was created");↵
|
3 | }↵ | | 3 | }↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Server does not do the requested feature.↵ | | 5 | * Indicates the document was accepted.↵
|
6 | * ↵ | | 6 | * ↵
|
7 | * @return The header in a string;↵ | | 7 | * @return The header in a string;↵
|
8 | */↵ | | 8 | */↵
|
9 | public static String formNotImplemented() {↵ | | 9 | public static String formAccepted() {↵
|
10 | return formError("501 Method not implemented", "Service not implemented");↵ | | 10 | return formError("↵
|
11 | }↵ | | |
|
|
12 | /**↵ | | |
|
13 | * Server is overloaded, client should try again latter↵ | | 11 | 202 Accepted", "Object checked in");↵
|
| | | 12 | }↵
|
|
| | | 13 | /**↵
|
14 | .↵ | | 14 | * Indicates only a partial responce was sent.↵
|
15 | * ↵ | | 15 | * ↵
|
16 | * @return The header in a string;↵ | | 16 | * @return The header in a string;↵
|
17 | */↵ | | 17 | */↵
|
18 | public static String formOverloaded() {↵ | | 18 | public static String formPartial() {↵
|
19 | return formError("502 Server overloaded", "Try again latter");↵ | | 19 | return formError("203 Partial", "Only partail document available");↵
|
20 | }↵ | | 20 | }↵
|
|
21 | /**↵ | | 21 | /**↵
|
22 | * Indicates the request took to long.↵ | | 22 | * Indicates a requested URL has moved to a new address or name.↵
|
23 | * ↵ | | 23 | * ↵
|
24 | * @return The header in a string;↵ | | 24 | * @return The header in a string;↵
|
25 | */↵ | | 25 | */↵
|
26 | public static String formTimeout() {↵ | | 26 | public static String formMoved() {↵
|
27 | return formError("503 Gateway timeout", "The connection timed out");↵ | | 27 | ↵
|
28 | }↵ | | |
|
|
29 | /**↵ | | |
|
30 | * Indicates the client's proxies could not locate a server↵ | | 28 | // 300 codes tell client to do actions↵
|
| | | 29 | return formError("301 Moved", "File has moved");↵
|
| | | 30 | }↵
|
|
| | | 31 | /**↵
|
31 | .↵ | | 32 | * Never seen this used.↵
|
32 | * ↵ | | 33 | * ↵
|
33 | * @return The header in a string;↵ | | 34 | * @return The header in a string;↵
|
34 | */↵ | | 35 | */↵
|
35 | public static String formServerNotFound() {↵ | | 36 | public static String formFound() {↵
|
36 | return formError("503 Gateway timeout", "The requested server was not found");↵ | | 37 | return formError("302 Found", "Object was found");↵
|
37 | }↵ | | 38 | }↵
|
|
38 | /**↵ | | 39 | /**↵
|
39 | * Indicates the client is not allowed to access the object.↵ | | 40 | * The requested method is not implemented by the server.↵
|
40 | * ↵ | | 41 | * ↵
|
41 | * @return The header in a string;↵ | | 42 | * @return The header in a string;↵
|
42 | */↵ | | 43 | */↵
|
43 | public static String formNotAllowed() {↵ | | 44 | public static String formMethod() {↵
|
44 | return formError("403 Access Denied", "Access is not allowed");↵ | | 45 | return formError("303 Method unseported", "Method unseported");↵
|
45 | } | | 46 | }
|