protected void socket(String path, WebSocketListener listener) { Request.Builder req = new Request.Builder(); setWsPath(req, path); setKeys(req); setBody(req, Method.GET, null); WebSocketCall.create(ok, req.build()).enqueue(listener); }
private void socket(WebSocketListener listener) throws IOException { server.enqueue(new MockResponse().setBody(getResource("user-session-success.json"))); server.enqueue(new MockResponse().withWebSocketUpgrade(listener)); }