From 5207fb7d6f4144c550ae8b303573240d90707725 Mon Sep 17 00:00:00 2001 From: Phillip LeBlanc Date: Tue, 17 Dec 2024 16:04:30 +0900 Subject: [PATCH] Prepend user-supplied user-agent (#30) --- src/main/java/ai/spice/SpiceClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ai/spice/SpiceClient.java b/src/main/java/ai/spice/SpiceClient.java index 7919f62..f54ccf5 100644 --- a/src/main/java/ai/spice/SpiceClient.java +++ b/src/main/java/ai/spice/SpiceClient.java @@ -121,7 +121,8 @@ public SpiceClient(String appId, String apiKey, URI flightAddress, URI httpAddre if (Strings.isNullOrEmpty(userAgent)) { uaString = Config.getUserAgent(); } else { - uaString = userAgent; + // Prepend the user-supplied user agent string with the Spice.ai user agent + uaString = userAgent + " " + Config.getUserAgent(); } headers.put("User-Agent", uaString);