Skip to content

Commit 9cd16c1

Browse files
authored
Updated key/endpoint
Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables.
1 parent 0d20f1e commit 9cd16c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/Search/BingAutosuggestv7.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727

2828
public class Autosuggest {
2929

30-
// **********************************************
31-
// *** Update or verify the following values. ***
32-
// **********************************************
30+
// **********************************************
31+
// *** Update or verify the following values. ***
32+
// **********************************************
3333

34-
// Replace the subscriptionKey string value with your valid subscription key.
35-
static String subscriptionKey = "enter key here";
34+
// Add your Bing Autosuggest subscription key to your environment variables.
35+
static String subscriptionKey = System.getenv("BING_AUTOSUGGEST_SUBSCRIPTION_KEY");
3636

37-
static String host = "https://api.cognitive.microsoft.com";
37+
static String host = System.getenv("BING_AUTOSUGGEST_ENDPOINT");
3838
static String path = "/bing/v7.0/Suggestions";
3939

4040
static String mkt = "en-US";

0 commit comments

Comments
 (0)