Skip to content

Commit c3f4e05

Browse files
authored
Merge pull request #61 from wiazur/patch-21
Updated key/endpoint
2 parents 1ee3b91 + fc9a048 commit c3f4e05

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dotnet/Search/BingSpellCheckv7.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ namespace SpellCheckSample
1010
{
1111
class Program
1212
{
13-
static string host = "https://api.cognitive.microsoft.com";
13+
// Add your Azure Bing Spell Check endpoint to your environment variables.
14+
static string host = Environment.GetEnvironmentVariable("BING_SPELL_CHECK_ENDPOINT");
1415
static string path = "/bing/v7.0/spellcheck?";
1516

1617
// For a list of available markets, go to:
1718
// https://docs.microsoft.com/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#market-codes
1819
static string params_ = "mkt=en-US&mode=proof";
1920

20-
// NOTE: Replace this example key with a valid subscription key.
21-
static string key = "enter your key here";
21+
// Add your Azure Bing Spell Check subscription key to your environment variables.
22+
static string key = Environment.GetEnvironmentVariable("BING_SPELL_CHECK_SUBSCRIPTION_KEY");
2223
//text to be spell-checked
2324
static string text = "Hollo, wrld!";
2425

@@ -74,4 +75,4 @@ static void Main(string[] args)
7475
}
7576

7677
}
77-
}
78+
}

0 commit comments

Comments
 (0)