Example usage for Java org.springframework.mock.web MockHttpServletResponse fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addHeader(String name, String value) |
boolean | containsHeader(String name) |
void | flushBuffer() |
String | getCharacterEncoding() |
byte[] | getContentAsByteArray() |
String | getContentAsString() Get the content of the response body as a String , using the charset specified for the response by the application, either through HttpServletResponse methods or through a charset parameter on the Content-Type . |
int | getContentLength() |
String | getContentType() |
Cookie | getCookie(String name) |
Cookie[] | getCookies() |
String | getErrorMessage() |
String | getForwardedUrl() |
String | getHeader(String name) Return the primary value for the given header as a String, if any. |
Collection | getHeaderNames() Return the names of all specified headers as a Set of Strings. |
List | getHeaders(String name) Return all values for the given header as a List of Strings. |
Object | getHeaderValue(String name) Return the primary value for the given header, if any. |
Locale | getLocale() |
ServletOutputStream | getOutputStream() |
String | getRedirectedUrl() |
int | getStatus() |
PrintWriter | getWriter() |
boolean | isCommitted() |
void | setCharacterEncoding(String characterEncoding) |
void | setCommitted(boolean committed) |
void | setContentType(@Nullable String contentType) |
void | setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) Set whether #getOutputStream() access is allowed. |
void | setStatus(int status) |
void | setWriterAccessAllowed(boolean writerAccessAllowed) Set whether #getWriter() access is allowed. |