From 9ee996e2ba9cc6f5019f692fb29750ab92a61125 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Thu, 7 Apr 2022 16:27:01 +0200 Subject: Pass query to status page request --- .../java/ai/vespa/hosted/client/AbstractConfigServerClient.java | 7 +++++++ .../src/main/java/ai/vespa/hosted/client/ConfigServerClient.java | 3 +++ 2 files changed, 10 insertions(+) (limited to 'configserver-client') diff --git a/configserver-client/src/main/java/ai/vespa/hosted/client/AbstractConfigServerClient.java b/configserver-client/src/main/java/ai/vespa/hosted/client/AbstractConfigServerClient.java index 02a0d07626c..3422d96e1d3 100644 --- a/configserver-client/src/main/java/ai/vespa/hosted/client/AbstractConfigServerClient.java +++ b/configserver-client/src/main/java/ai/vespa/hosted/client/AbstractConfigServerClient.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package ai.vespa.hosted.client; +import ai.vespa.hosted.client.ConfigServerClient.RequestBuilder; import ai.vespa.http.HttpURL; import ai.vespa.http.HttpURL.Path; import ai.vespa.http.HttpURL.Query; @@ -154,6 +155,12 @@ public abstract class AbstractConfigServerClient implements ConfigServerClient { return this; } + @Override + public ConfigServerClient.RequestBuilder parameters(Query query) { + this.query = this.query.add(query.entries()); + return this; + } + @Override public RequestBuilder timeout(Duration timeout) { return config(RequestConfig.copy(config) diff --git a/configserver-client/src/main/java/ai/vespa/hosted/client/ConfigServerClient.java b/configserver-client/src/main/java/ai/vespa/hosted/client/ConfigServerClient.java index 2dde98086e8..47e062766c6 100644 --- a/configserver-client/src/main/java/ai/vespa/hosted/client/ConfigServerClient.java +++ b/configserver-client/src/main/java/ai/vespa/hosted/client/ConfigServerClient.java @@ -94,6 +94,9 @@ public interface ConfigServerClient extends Closeable { /** Sets the parameter key/values for the request. Number of arguments must be even. Pairs with {@code null} values are omitted. */ RequestBuilder parameters(List pairs); + /** Appends all parameters from the given query. */ + RequestBuilder parameters(Query query); + /** Overrides the default socket read timeout of the request. {@code Duration.ZERO} gives infinite timeout. */ RequestBuilder timeout(Duration timeout); -- cgit v1.2.3