top of page
Search
  • Writer's pictureMichael Fomenko

HttpStatusDogs is published! 🐶

A few years back I wrote a simple Spring Boot starter that adds a header to your HTTP responses with a link to the appropriate HTTP status dog. The pet project (pun intended) was inspired by Mike Lee's project httpstatusdogs.com


Today I released it on Maven Central! 🥳


Usage

You can start using it just by adding it to your dependency list like this for Gradle:

implementation 'dev.fomenko:httpstatusdogs:1.0.0'

or for Maven:

 <dependency>
    <groupId>dev.fomenko</groupId>
    <artifactId>httpstatusdogs</artifactId>
    <version>1.0.0</version>
 </dependency> 

So now, for any endpoint, you'll have a HttpStatusDog header.


Example

Here's an example of a Spring controller

  @RestControllerclass FakeController {
         @GetMapping("/404")
         public String method404(HttpServletResponse response) {
              response.setStatus(404);
              return "Test";
         }
  }

and the response it provides:

HTTP/1.1 404 
StatusDog: https://httpstatusdogs.com/img/404.jpg
Content-Type: text/plain;charset=UTF-8
Content-Length: 5
Date: Fri, 13 May 2022 20:42:44 GMT

Test


You can find the code on my GitHub: https://github.com/michaelfmnkhttpstatusdogs

P.S: For me, this lib is an attempt at releasing my own library. I'm planning on releasing my other projects soon.

Recent Posts

See All

Check out Spring Undo ↩️ v0.0.1!

I just published Spring Undo v0.0.1 The library is still in development, but you can already try it out, all basic functionality works. Just don't use it for production yet :) GitHub: https://github.c

Post: Blog2_Post
bottom of page