Question: I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values.

I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only defines about half of the valid HTTP response codes.

Answer: 
Everyone seems to be ignoring the "enum type" portion of your question.

While there is no canonical source for HTTP Status Codes there is an simple way to *add* any missing Status constants you need to those provided by `javax.ws.rs.core.Response.Status` without adding any additional dependencies to your project.

`javax.ws.rs.core.Response.Status` is just one implementation of the `javax.ws.rs.core.Response.StatusType` interface. You simply need to create your own implementation enum with definitions for the Status Codes that you want. 

Core libraries like Javax, Jersey, etc. are written to the *interface* `StatusType` not the *implementation* `Status` (or they certainly **should** be). Since your new Status enum implements `StatusType` it can be used anyplace you would use a `javax.ws.rs.core.Response.Status` constant.

Just remember that your own code should also be written to the `StatusType` interface. This will enable you to use both your own Status Codes along side the "standard" ones.

Here's a gist with a simple implementation with constants defined for the "Informational 1xx" Status Codes: <https://gist.github.com/avendasora/a5ed9acf6b1ee709a14a>
If you are using **Netty**, you can use:

* io.netty.handler.codec.http.[**HttpResponseStatus**](http://netty.io/4.0/api/io/netty/handler/codec/http/HttpResponseStatus.html)