diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2022-05-02 21:09:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 21:09:20 +0200 |
commit | e046ae79779261b09f85bcf4c04c906b83075775 (patch) | |
tree | f6983d307d0e84a1dbaeda89726dd8d53e55e927 /http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java | |
parent | d2066c0a0c04e2aa2ada12a5c85f5eae9ff65b02 (diff) | |
parent | 6058f5f8d2ed19ca3c0461e7080680a093834823 (diff) |
Merge pull request #22394 from vespa-engine/revert-22374-jonmv/remove-last-controller-jersey-client
Revert "Jonmv/remove last controller jersey client [run-systemtest]"
Diffstat (limited to 'http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java')
-rw-r--r-- | http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java b/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java index 16a419bf324..b41b16c25be 100644 --- a/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java +++ b/http-client/src/main/java/ai/vespa/hosted/client/HttpClient.java @@ -78,13 +78,7 @@ public interface HttpClient extends Closeable { RequestBuilder body(byte[] json); /** Sets the request body. */ - default RequestBuilder body(HttpEntity entity) { - if (entity.isRepeatable()) return body(() -> entity); - throw new IllegalArgumentException("entitiy must be repeatable, or a supplier must be used"); - } - - /** Sets the request body. */ - RequestBuilder body(Supplier<HttpEntity> entity); + RequestBuilder body(HttpEntity entity); /** Sets query parameters without a value, like {@code ?debug&recursive}. */ default RequestBuilder emptyParameters(String... keys) { |