* JSON-RPC request as body. Response will be a JSON-RPC response.
*/
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
JSONRequest jsonRequest = null;
JSONResponse jsonResponse = null;
String body = null;
String agentUrl = null;
String agentId = null;
try {
// retrieve the agent url and the request body
body = StringUtil.streamToString(req.getInputStream());
jsonRequest = new JSONRequest(body);
agentUrl = req.getRequestURI();
agentId = httpTransport.getAgentId(agentUrl);
if (agentId == null || agentId.isEmpty()) {
resp.sendError(400, "No agentId found in url.");