Class SimpleResponse

java.lang.Object
com.atlassian.oai.validator.model.SimpleResponse
All Implemented Interfaces:
Response

public class SimpleResponse extends Object implements Response
Simple immutable Response implementation
  • Method Details

    • getStatus

      public int getStatus()
      Specified by:
      getStatus in interface Response
      Returns:
      The response status code
    • getBody

      @Nonnull public Optional<String> getBody()
      Specified by:
      getBody in interface Response
      Returns:
      The response body, if there is one.
    • getResponseBody

      @Nonnull public Optional<Body> getResponseBody()
      Specified by:
      getResponseBody in interface Response
      Returns:
      the response body
    • getHeaderValues

      @Nonnull public Collection<String> getHeaderValues(String name)
      Description copied from interface: Response
      Get the collection of header values for the header param with the given name.
      Specified by:
      getHeaderValues in interface Response
      Parameters:
      name - The (case insensitive) name of the parameter to retrieve
      Returns:
      The header values for that param; or empty list