Skip to content

Commit fa8b04a

Browse files
authored
Merge pull request #53 from wiazur/patch-13
Updated endpoint / key
2 parents b01eb79 + d2d00e6 commit fa8b04a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dotnet/Search/BingAutosuggestv7.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ namespace AutosuggestSample1
1111
{
1212
class Program
1313
{
14-
static string host = "https://api.cognitive.microsoft.com";
14+
// Add your Azure Bing Autosuggest endpoint to your environment variables.
15+
static string host = Environment.GetEnvironmentVariable("BING_AUTOSUGGEST_ENDPOINT");
1516
static string path = "/bing/v7.0/Suggestions";
16-
17+
1718
// For a list of available markets, go to:
1819
// https://docs.microsoft.com/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#market-codes
1920
static string market = "en-US";
2021

21-
// NOTE: Replace this example key with a valid subscription key.
22-
static string key = "INSERT YOUR API KEY HERE";
22+
// Add your Azure Bing Autosuggest subscription key to your environment variables.
23+
static string key = Environment.GetEnvironmentVariable("BING_AUTOSUGGEST_SUBSCRIPTION_KEY");
2324

2425
static string query = "sail";
2526

0 commit comments

Comments
 (0)