open fun send(object: Any): Unit
Write the given object to the response.
If any exception occurs a dispatch is made back to the app server where Spring MVC will pass the exception through its exception handling mechanism.
IOException - raised when an I/O error occurs
java.lang.IllegalStateException - wraps any other errors
open fun send(object: Any, @Nullable mediaType: MediaType): Unit
Write the given object to the response also using a MediaType hint.
If any exception occurs a dispatch is made back to the app server where Spring MVC will pass the exception through its exception handling mechanism.
mediaType - a MediaType hint for selecting an HttpMessageConverter