Interface ResponseContext


public interface ResponseContext
Interface for the important parts of a response. This is created after executing the request.
  • Method Details

    • getStatus

      Status getStatus()
      Get the status of the response.
    • getInputStream

      @Nullable InputStream getInputStream() throws IOException
      Get the input stream for the response. Returns null if the response did not contain any readable entity.
      Throws:
      IOException
    • isJsonCompatibleResponse

      default boolean isJsonCompatibleResponse()
    • getContentType

      String getContentType()
    • getRequestedUri

      URI getRequestedUri()
    • close

      default void close(Exception error)
      Close the response context.
      Parameters:
      error - if the request failed, this is the exception that caused the failure; will be null otherwise