]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.util/src/org/argeo/util/http/HttpResponseStatus.java
Refactor WebDav implementation
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / http / HttpResponseStatus.java
1 package org.argeo.util.http;
2
3 /**
4 * Standard HTTP response status codes (including WebDav ones).
5 *
6 * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
7 */
8 public enum HttpResponseStatus {
9 // Successful responses (200–299)
10 OK(200), //
11 NO_CONTENT(204), //
12 MULTI_STATUS(207), // WebDav
13 // Client error responses (400–499)
14 UNAUTHORIZED(401), //
15 FORBIDDEN(403), //
16 NOT_FOUND(404), //
17 // Server error responses (500-599)
18 INTERNAL_SERVER_ERROR(500), //
19 NOT_IMPLEMENTED(501), //
20 ;
21
22 private final int code;
23
24 HttpResponseStatus(int statusCode) {
25 this.code = statusCode;
26 }
27
28 public int getCode() {
29 return code;
30 }
31
32 }