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