From 375cf5201a03333bd650d8e39d739d2e079a0b8d Mon Sep 17 00:00:00 2001 From: "Felix E. Drud" Date: Mon, 25 Oct 2021 11:08:27 +0200 Subject: [PATCH] Added User-Agent header to sample code for fetching integration config --- Documentation/IntegrationConfigProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/IntegrationConfigProvider.java b/Documentation/IntegrationConfigProvider.java index 9050967..aa7d69b 100644 --- a/Documentation/IntegrationConfigProvider.java +++ b/Documentation/IntegrationConfigProvider.java @@ -75,6 +75,7 @@ private static String getJsonText(String url) throws IOException { URL resource = new URL(url); URLConnection connection = resource.openConnection(); connection.setRequestProperty("api-key", apiKey); + connection.setRequestProperty("User-Agent", "queueit-connector"); BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); StringBuilder response = new StringBuilder(); String inputLine;