Skip to content

Commit df2d102

Browse files
authored
Minor
1 parent 3ac41d3 commit df2d102

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dotnet/Search/BingEntitySearchv7.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
using System;
33
using 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+

0 commit comments

Comments
 (0)