HTTP Statusses 7XX

Now add even more fun with randomizing HTTP Status 7XX.

A new version for Jersey has been released.

With using getRandom method you can return a randomized HTTP 7XX status (e.g. instead of sever error 500 or on unimplemented API calls )

Get the dependency with

<dependency>
    <groupId>be.redlab.jersey</groupId>
    <artifactId>http-7xx</artifactId>
    <version>1.1</version>
</dependency>

Release Info and tag at github

The new release also removes the rebel.xml file from the resources. Although it’s not in the source control, it was in the released artifact due to building that locally. The release is a bit over time due to my gpg key that was expired, that’s fixed now.

/**
 * Puzzle your users with returning a pseudo random HttpStatus7xx on every call.
 *
 * @return a pseudo randomly chosen HttpStatus7xx
 */
public static HttpStatus7xx getRandom() {
	return HttpStatus7xx.values()[RND.nextInt(MAX_RND)];
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: