Github user EronWright commented on a diff in the pull request:
https://github.com/apache/flink/pull/4767#discussion_r142700416
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java ---
@@ -275,4 +301,121 @@ public HttpResponseStatus getHttpResponseStatus() {
return httpResponseStatus;
}
}
+
+ public <M extends MessageHeaders<EmptyRequestBody,
WebSocketUpgradeResponseBody, U>, U extends MessageParameters, R extends
ResponseBody> CompletableFuture<WebSocket> sendWebSocketRequest(String
targetAddress, int targetPort, M messageHeaders, U messageParameters, Class<R>
messageClazz, WebSocketListener... listeners) throws IOException {
--- End diff --
I too was unhappy about using a special response body, but felt that the
alternative required some rework of the REST handler that was best done in a
follow-up. With some rework we can eliminate the funky response body.
---