Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/6147#discussion_r195076266 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java --- @@ -197,6 +208,88 @@ public void shutdown(Time timeout) { executor); } + public <M extends MessageHeaders<R, P, U>, U extends MessageParameters, R extends RequestBody, P extends ResponseBody> CompletableFuture<P> sendRequest( --- End diff -- This method and the other `sendRequest` method contain a lot of duplicate code. Can we simplify this by having a `sendRequestInternal` method which takes a `RequestBodyProvider` which can be for `POST`, `PUT` and `OPTIONS` be a `HttpPostRequestEncoder` and for all other verbs a `VoidBodyProvider`?
---