Skip to content

Commit cb0182d

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 cb0182d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

java/Search/BingSpellCheckv7.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
public class HelloWorld {
66

7-
static String host = "https://api.cognitive.microsoft.com";
7+
// Add your Bing Spell Check subscription key to your environment variables.
8+
static String host = System.getenv("BING_SPELL_CHECK_ENDPOINT");
89
static String path = "/bing/v7.0/spellcheck";
910

10-
// NOTE: Replace this example key with a valid subscription key.
11-
static String key = "ENTER KEY HERE";
11+
// Add your Bing Spell Check endpoint to your environment variables.
12+
static String key = System.getenv("BING_SPELL_CHECK_SUBSCRIPTION_KEY");
1213

1314
static String mkt = "en-US";
1415
static String mode = "proof";
@@ -46,4 +47,4 @@ public static void main(String[] args) {
4647
System.out.println (e);
4748
}
4849
}
49-
}
50+
}

0 commit comments

Comments
 (0)