@Override
        public Response apply(AndroidDevice device) {
          try {
            // Check if the instrumentation process died in the middle of the request
            if (session.instrumentationProcessFinished()) {
              return respondWithInstrumentationProcessFinished(
                sessionId,
                session.getInstrumentationProcessOutput(),
                session.getInstrumentationProcessError(),
                device);
            }

            JSONObject response = proxyRequestToDevice(request, session, url, method);
            if (response == null) { // Unknown command
              return new SelendroidResponse(sessionId, StatusCode.UNKNOWN_COMMAND);
            }

            Object value = response.opt("value");
            int statusCode = response.getInt("status");
            log.fine(
              String.format(
                "Response from selendroid-server, status %d:\n%s",
                statusCode,
                value));

            return new SelendroidResponse(sessionId, StatusCode.fromInteger(statusCode), value);
          } catch (Exception e) {
            log.log(Level.SEVERE, "Failed to proxy request to Selendroid Server, retrying.", e);
            return null;
          }
        }
Proxies the request as-is to the device.
selendroid-standalone/src/main/java/io/selendroid/standalone/server/handler/ProxyToDeviceHandler.java