HTTP status codes library

The aim of this library is to provide all official an unofficial HTTP status codes along with a simple but efficient API to handle the codes.

License

License

GroupId

GroupId

com.deevvi
ArtifactId

ArtifactId

http-status-code
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

HTTP status codes library
The aim of this library is to provide all official an unofficial HTTP status codes along with a simple but efficient API to handle the codes.
Project URL

Project URL

https://github.com/deevvicom/http-status-code
Source Code Management

Source Code Management

http://github.com/deevvicom/http-status-code

Download http-status-code

How to add to project

<!-- https://jarcasting.com/artifacts/com.deevvi/http-status-code/ -->
<dependency>
    <groupId>com.deevvi</groupId>
    <artifactId>http-status-code</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.deevvi/http-status-code/
implementation 'com.deevvi:http-status-code:1.1.0'
// https://jarcasting.com/artifacts/com.deevvi/http-status-code/
implementation ("com.deevvi:http-status-code:1.1.0")
'com.deevvi:http-status-code:jar:1.1.0'
<dependency org="com.deevvi" name="http-status-code" rev="1.1.0">
  <artifact name="http-status-code" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.deevvi', module='http-status-code', version='1.1.0')
)
libraryDependencies += "com.deevvi" % "http-status-code" % "1.1.0"
[com.deevvi/http-status-code "1.1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.mockito : mockito-core jar 3.8.0
org.mockito : mockito-inline jar 3.8.0

test (3)

Group / Artifact Type Version
org.junit.vintage : junit-vintage-engine jar 5.3.2
org.junit.jupiter : junit-jupiter-engine jar 5.3.2
com.google.truth : truth jar 1.1.2

Project Modules

There are no modules declared in this project.

HTTP status code

What is not:

  • is not yet another library containing HTTP status codes.
  • is not a clone of existing solutions (Spring Framework, Apache HTTP).

Why:

  • existing solutions don't offer support for non-standard status codes.

What is:

  • a collection of standard and non-standard codes.
  • it contains other info like RFC where a code was published or entity that uses a given code

How to use it

The recommended way to use this library is through your build tool.

The http-status-code artifact is published to Maven Central, using the group com.deevvi.

Latest stable version is 1.1.0.

Therefore,it can be added to your Gradle project by adding the dependencies:

compile "com.deevvi:http-status-code:1.1.0"

and in Maven:

<dependency>
    <groupId>com.deevvi</groupId>
    <artifactId>http-status-code</artifactId>
    <version>1.1.0</version>
</dependency>

Code example:

HttpStatusCode.isValidValue(999);
HttpStatusCode.resolve(100).isServerError();

HttpStatusCode statusCode = HttpStatusCode.resolve(300);
if(statusCode.isSuccessful()){
  ...
}

Versions

Version
1.1.0
1.0.0