beforeBodyWrite

open override fun beforeBodyWrite(body: TapikResponse?, returnType: MethodParameter, selectedContentType: MediaType, selectedConverterType: Class<out HttpMessageConverter<*>>, request: ServerHttpRequest, response: ServerHttpResponse): TapikResponse?(source)

Writes the Tapik-managed response with Tapik-controlled encoding and suppresses Spring's normal body serialization.

Return

null after the encoded response body has been written, or null immediately when body is null.

Parameters

body

Tapik response returned by the controller.

returnType

declared controller return type metadata.

selectedContentType

content type selected by Spring.

selectedConverterType

Spring message converter selected for the response.

request

current HTTP request abstraction.

response

current HTTP response abstraction.