Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class MockResponse
- Object
- MockResponse
What a
MockMvc request came back with.Methods
public int getStatus() | |
public String getContentType() | The Content-Type, or null. |
public String getContentAsString() | The body as UTF-8 text. |
public byte[] getContentAsByteArray() | |
public String getHeader(String name) | The first value of a header, by a name in any case; or null. |
public List getHeaders(String name) | Every value of a header, by a name in any case. |
public List getHeaderNames() | The names of the headers set, in order. |
public String getCookie(String name) | The value of a cookie this response sets, or null. |
public String getRedirectedUrl() | The Location of a redirect, or null. |
Inherited methods
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.