Class HttpStatusResolver

java.lang.Object
org.frankframework.http.HttpStatusResolver

public class HttpStatusResolver extends Object
  • Constructor Details

    • HttpStatusResolver

      public HttpStatusResolver()
  • Method Details

    • getHttpStatusCode

      public static @NonNull org.springframework.http.HttpStatusCode getHttpStatusCode(int statusCode)
      Tries to resolve the given status code to a HTTP status code.
    • getReasonPhrase

      public static Optional<String> getReasonPhrase(int statusCode)
      Custom status codes don't have a reason phrase, so this method returns an empty string for those. For valid HTTP status codes, it returns the reason phrase.
    • validateHttpStatusCode

      public static int validateHttpStatusCode(int statusCode)
      Validates that the given status code is a three-digit positive integer between 100 and 599. If the status code is invalid thows IllegalArgumentException.