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