code: private JsonRpcError validateTransport(HttpRequest request) throws URISyntaxException,
        JsonRpcError {
      URI uri = new URI(request.getUri());
      JsonRpcError error = null;
  
      if (!uri.getPath().equals(rpcPath)) {
        error = new JsonRpcError(HttpResponseStatus.NOT_FOUND, "Not Found");
      }
  
      if (!request.getMethod().equals(HttpMethod.POST)) {
        error = new JsonRpcError(HttpResponseStatus.METHOD_NOT_ALLOWED,
            "Method not allowed");
      }
  
      if (!request.headers().get(HttpHeaders.Names.CONTENT_TYPE)
          .equals(JsonRpcProtocol.CONTENT_TYPE)) {
        error = new JsonRpcError(HttpResponseStatus.UNSUPPORTED_MEDIA_TYPE,
            "Unsupported media type");
      }
  
      return error;
    }
docs: In charge of validating all the transport-related aspects of the incoming
  HTTP request.
  <p/>
  <p>The checks include:</p>
  <p/>
  <ul>
  <li>that the request's path matches that of this handler;</li>
  <li>that the request's method is {@code POST};</li>
  <li>that the request's content-type is {@code application/json};</li>
  </ul>
  
  @param request the received HTTP request
  @return {@code null} if the request passes the transport checks, an error
  to return to the client otherwise.
  @throws URISyntaxException if the URI of the request cannot be parsed