This class will be very similar to the existing KiwiResponses in the org.kiwiproject.jaxrs package which is specific to and depends on Jakarta RESTful Web Services. Unlike that class, this one will have no external library dependencies, so it can be used independent of the web/REST library in use.
It will initially contain methods to check status codes and whether a status code is in a family such as a successful response, a client error response, etc.
The impetus for this was that I was recently using OkHttp's MockWebServer for some test code in a library. That library does not use Jakarta RESTful Web Services, and therefore I could not use KiwiResponses (without adding a dependency which I wanted to avoid.)
This class will be very similar to the existing
KiwiResponses
in theorg.kiwiproject.jaxrs
package which is specific to and depends on Jakarta RESTful Web Services. Unlike that class, this one will have no external library dependencies, so it can be used independent of the web/REST library in use.It will initially contain methods to check status codes and whether a status code is in a family such as a successful response, a client error response, etc.
The impetus for this was that I was recently using OkHttp's
MockWebServer
for some test code in a library. That library does not use Jakarta RESTful Web Services, and therefore I could not useKiwiResponses
(without adding a dependency which I wanted to avoid.)