I use Spring framework for creating REST HTTP server.
@RestController
@RequestMapping("/message")
public class MessageRequest {
@RequestMapping(method = RequestMethod.POST)
public @ResponseBody String doPost(
@PathVariable String param
) {
/*do something */
retu "answer";
}
}
I need to check coection before sending response to a client. If client was discoected (example by read timeout), then answer will be sending via another way. How can i check coection before retuing of response?
