Skip to content

Commit

Permalink
Updated key/endpoint
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wiazur authored Sep 4, 2019
1 parent 0d20f1e commit cb0182d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions java/Search/BingSpellCheckv7.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

public class HelloWorld {

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

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

static String mkt = "en-US";
static String mode = "proof";
Expand Down Expand Up @@ -46,4 +47,4 @@ public static void main(String[] args) {
System.out.println (e);
}
}
}
}

0 comments on commit cb0182d

Please sign in to comment.