Interface WsResponse

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
MockWsResponse

public interface WsResponse extends Closeable
Since:
5.3
  • Method Details

    • requestUrl

      String requestUrl()
      The absolute requested URL
    • code

      int code()
      HTTP status code
    • isSuccessful

      boolean isSuccessful()
      Returns true if the code is in [200..300), which means the request was successfully received, understood, and accepted.
    • failIfNotSuccessful

      WsResponse failIfNotSuccessful()
      Throws a HttpException if isSuccessful() is false.
    • contentType

      String contentType()
    • header

      Optional<String> header(String name)
    • headers

      Map<String,List<String>> headers()
    • hasContent

      boolean hasContent()
    • contentStream

      InputStream contentStream()
    • contentReader

      Reader contentReader()
    • content

      String content()
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable