Bing Spell Check
A Bing service that detects and corrects spelling mistakes in your app.
36 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I use api spellcheck , the status code is success ,but the flaggedTokens doesn't has value
the response head still is 'BingAPIs-Market: zh-CN' ,but I set parameter mkt=en-US
Hope Get your help,thanks.
the code:
string text="bill gatas";
string uri="https://api.bing.microsoft.com/v7.0/spellcheck?mkt=en-US&mode=proof";
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", key);
HttpResponseMessage response = null;
var values = new Dictionary<string, string>();
values.Add("text", text);
var content = new FormUrlEncodedContent(values);
content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
response = await client.PostAsync(uri, new FormUrlEncodedContent(values));
string contentString = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
Newtonsoft.Json.Linq.JObject ja = (Newtonsoft.Json.Linq.JObject)JsonConvert.DeserializeObject(contentString);
if (ja.Count > 0 && ja["flaggedTokens"].HasValues)
{
}
}