I've a web application that deals with certain library on server side. there's a REST apis that execute some functions from this library on the server and return strings.
The returned strings can be very large ~ 100k lines.
I'm not experienced in this area. my question is what is the proper way to deal with such situation.
currently I'm returning everything in string but I feel im missing something
/**
* POST /do/action
* @param action
*/
@PostMapping("/do/action")
@Timed
public @ResponseBody String doAction(@RequestParam String action) throws URISyntaxException {
return JSONObject.quote(actionService.doAction(action));
}