Class MockResponse

java.lang.Object
com.codename1.backend.test.MockResponse

public final class MockResponse extends Object
What a MockMvc request came back with.
  • Method Details

    • getStatus

      public int getStatus()
    • getContentType

      public String getContentType()
      The Content-Type, or null.
    • getContentAsString

      public String getContentAsString()
      The body as UTF-8 text.
    • getContentAsByteArray

      public byte[] getContentAsByteArray()
    • getHeader

      public String getHeader(String name)
      The first value of a header, by a name in any case; or null.
    • getHeaders

      public List getHeaders(String name)
      Every value of a header, by a name in any case.
    • getHeaderNames

      public List getHeaderNames()
      The names of the headers set, in order.
    • getCookie

      public String getCookie(String name)
      The value of a cookie this response sets, or null.
    • getRedirectedUrl

      public String getRedirectedUrl()
      The Location of a redirect, or null.