Skip to content

Commit 8523c34

Browse files
Added HTTP status codes
1 parent be86f9f commit 8523c34

4 files changed

Lines changed: 85 additions & 5 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Mauricio Togneri
3+
Copyright (c) 2019 Mauricio Togneri
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ or if you use Gradle:
3232
```groovy
3333
dependencies
3434
{
35-
compile 'com.mauriciotogneri:javautils:3.0.0'
35+
compile 'com.mauriciotogneri:javautils:3.1.0'
3636
}
3737
```

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<modelVersion>4.0.0</modelVersion>
88
<groupId>com.mauriciotogneri</groupId>
99
<artifactId>javautils</artifactId>
10-
<version>3.0.0</version>
10+
<version>3.1.0</version>
1111
<name>Java Utils</name>
1212
<packaging>jar</packaging>
1313
<url>https://github.com/mauriciotogneri/java-utils</url>
@@ -33,7 +33,7 @@
3333
<plugin>
3434
<groupId>org.apache.maven.plugins</groupId>
3535
<artifactId>maven-jar-plugin</artifactId>
36-
<version>3.1.0</version>
36+
<version>3.1.1</version>
3737
</plugin>
3838
<plugin>
3939
<groupId>org.apache.maven.plugins</groupId>
@@ -81,7 +81,7 @@
8181
<dependency>
8282
<groupId>joda-time</groupId>
8383
<artifactId>joda-time</artifactId>
84-
<version>2.10</version>
84+
<version>2.10.1</version>
8585
</dependency>
8686

8787
</dependencies>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
package com.mauriciotogneri.javautils;
2+
3+
public class HttpStatus
4+
{
5+
// 1xx Informational
6+
public static Integer CONTINUE = 100;
7+
public static Integer SWITCHING_PROTOCOLS = 101;
8+
public static Integer PROCESSING = 102;
9+
10+
// 2xx Success
11+
public static Integer OK = 200;
12+
public static Integer CREATED = 201;
13+
public static Integer ACCEPTED = 202;
14+
public static Integer NON_AUTHORITATIVE_INFORMATION = 203;
15+
public static Integer NO_CONTENT = 204;
16+
public static Integer RESET_CONTENT = 205;
17+
public static Integer PARTIAL_CONTENT = 206;
18+
public static Integer MULTI_STATUS = 207;
19+
public static Integer ALREADY_REPORTED = 208;
20+
public static Integer IM_USED = 226;
21+
22+
// 3xx Redirection
23+
public static Integer MULTIPLE_CHOICES = 300;
24+
public static Integer MOVED_PERMANENTLY = 301;
25+
public static Integer FOUND = 302;
26+
public static Integer SEE_OTHER = 303;
27+
public static Integer NOT_MODIFIED = 304;
28+
public static Integer USE_PROXY = 305;
29+
public static Integer TEMPORARY_REDIRECT = 307;
30+
public static Integer PERMANENT_REDIRECT = 308;
31+
32+
// 4xx Client Error
33+
public static Integer BAD_REQUEST = 400;
34+
public static Integer UNAUTHORIZED = 401;
35+
public static Integer PAYMENT_REQUIRED = 402;
36+
public static Integer FORBIDDEN = 403;
37+
public static Integer NOT_FOUND = 404;
38+
public static Integer METHOD_NOT_ALLOWED = 405;
39+
public static Integer NOT_ACCEPTABLE = 406;
40+
public static Integer PROXY_AUTHENTICATION_REQUIRED = 407;
41+
public static Integer REQUEST_TIMEOUT = 408;
42+
public static Integer CONFLICT = 409;
43+
public static Integer GONE = 410;
44+
public static Integer LENGTH_REQUIRED = 411;
45+
public static Integer PRECONDITION_FAILED = 412;
46+
public static Integer REQUEST_ENTITY_TOO_LARGE = 413;
47+
public static Integer REQUEST_URI_TOO_LONG = 414;
48+
public static Integer UNSUPPORTED_MEDIA_TYPE = 415;
49+
public static Integer REQUESTED_RANGE_NOT_SATISFIABLE = 416;
50+
public static Integer EXPECTATION_FAILED = 417;
51+
public static Integer IAM_A_TEAPOT = 418;
52+
public static Integer ENHANCE_YOUR_CALM = 420;
53+
public static Integer UNPROCESSABLE_ENTITY = 422;
54+
public static Integer LOCKED = 423;
55+
public static Integer FAILED_DEPENDENCY = 424;
56+
public static Integer UPGRADE_REQUIRED = 426;
57+
public static Integer PRECONDITION_REQUIRED = 428;
58+
public static Integer TOO_MANY_REQUESTS = 429;
59+
public static Integer REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
60+
public static Integer NO_RESPONSE = 444;
61+
public static Integer RETRY_WITH = 449;
62+
public static Integer UNAVAILABLE_FOR_LEGAL_REASONS = 451;
63+
public static Integer CLIENT_CLOSED_REQUEST = 499;
64+
65+
// 5xx Server Error
66+
public static Integer INTERNAL_SERVER_ERROR = 500;
67+
public static Integer NOT_IMPLEMENTED_ = 501;
68+
public static Integer BAD_GETAWAT = 502;
69+
public static Integer SERVICE_UNAVAILABLE = 503;
70+
public static Integer GATEWAY_TIMEOUT = 504;
71+
public static Integer HTTP_VERSION_NOT_SUPPORTED = 505;
72+
public static Integer VARIANT_ALSO_NEGOTIATES = 506;
73+
public static Integer INSUFFICIENT_STORAGE = 507;
74+
public static Integer LOOP_DETECTED = 508;
75+
public static Integer BANDWIDTH_LIMIT_EXCEEDED = 509;
76+
public static Integer NOT_EXTENDED = 510;
77+
public static Integer NETWORK_AUTHENTICATION_REQUIRED = 511;
78+
public static Integer NETWORK_READ_TIMEOUT_ERROR = 598;
79+
public static Integer NETWORK_CONNECT_TIMEOUT_ERROR = 599;
80+
}

0 commit comments

Comments
 (0)