Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 523 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 523 Bytes

reasonphrase

Provides a lookup from HTTP Status Code to an HTTP Reason Phrase.

Usage

<dependency>
    <groupId>dev.mccue</groupId>
    <artifactId>reasonphrase</artifactId>
    <version>1.0.0</version>
</dependency>
import dev.mccue.reasonphrase.ReasonPhrase;

public class Main {
    public static void main(String[] args) {
        // OK
        System.out.println(ReasonPhrase.forStatus(200));
        
        // Not Found
        System.out.println(ReasonPhrase.forStatus(404));
    }
}