docs: void writeResult(final RpcResult<?, ?> result, final HttpServletResponse resp)
  			throws IOException {
  		if (result.isSuccess()) {
  			resp.setStatus(HttpServletResponse.SC_OK);
  			resp.setContentType(JSON_CONTENT_TYPE);
  		} else {
  			resp.setStatus(APPLICATION_EXC_STATUS);
  			resp.setContentType(JSON_CONTENT_TYPE);
  		}
  
  		PrintWriter writer = resp.getWriter();
  		result.toJson(writer, true);
  		writer.flush();
  	}