spring-framework / org.springframework.mock.web / MockBodyContent / <init>

<init>

MockBodyContent(content: String, response: HttpServletResponse)

Create a MockBodyContent for the given response.

Parameters

content - the body content to expose

response - the servlet response to wrap

MockBodyContent(content: String, targetWriter: Writer)

Create a MockBodyContent for the given response.

Parameters

content - the body content to expose

targetWriter - the target Writer to wrap

MockBodyContent(content: String, @Nullable response: HttpServletResponse, @Nullable targetWriter: Writer)

Create a MockBodyContent for the given response.

Parameters

content - the body content to expose

response - the servlet response to wrap

targetWriter - the target Writer to wrap