File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 22using System ;
33using System . Net . Http ;
44
5- namespace EntitySearchSample
5+ namespace BingEntitySearch
66{
77 class Program
88 {
9- static string host = Environment . GetEnvironmentVariable ( "BING_ENTITY_SEARCH_ENDPOINT" ) ;
10- static string path = "/bing/v7.0/entities" ;
9+ static string endpoint = Environment . GetEnvironmentVariable ( "BING_ENTITY_SEARCH_ENDPOINT" ) ;
10+ static string path = "/bing/v7.0/entities/ " ;
1111
1212 static string market = "en-US" ;
1313
@@ -21,7 +21,7 @@ async static void Search()
2121 HttpClient client = new HttpClient ( ) ;
2222 client . DefaultRequestHeaders . Add ( "Ocp-Apim-Subscription-Key" , key ) ;
2323
24- string uri = host + path + "?mkt=" + market + "&q=" + System . Net . WebUtility . UrlEncode ( query ) ;
24+ string uri = endpoint + path + "?mkt=" + market + "&q=" + System . Net . WebUtility . UrlEncode ( query ) ;
2525
2626 HttpResponseMessage response = await client . GetAsync ( uri ) ;
2727
@@ -39,3 +39,4 @@ static void Main(string[] args)
3939
4040 }
4141}
42+
You can’t perform that action at this time.
0 commit comments