File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
articles/cognitive-services/Translator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ Now we're going to create method to detect the language of the source text (text
365
365
HttpWebRequest detectLanguageWebRequest = (HttpWebRequest)WebRequest.Create(detectUri);
366
366
detectLanguageWebRequest.Headers.Add("Ocp-Apim-Subscription-Key", COGNITIVE_SERVICES_KEY);
367
367
detectLanguageWebRequest.Headers.Add("Ocp-Apim-Subscription-Region", "westus");
368
- detectLanguageWebRequest.ContentType = "app /json; charset=utf-8";
368
+ detectLanguageWebRequest.ContentType = "application /json; charset=utf-8";
369
369
detectLanguageWebRequest.Method = "POST";
370
370
371
371
// Send request
@@ -422,7 +422,7 @@ private string CorrectSpelling(string text)
422
422
HttpWebRequest spellCheckWebRequest = (HttpWebRequest )WebRequest .Create (uri );
423
423
spellCheckWebRequest .Headers .Add (" Ocp-Apim-Subscription-Key" , COGNITIVE_SERVICES_KEY );
424
424
spellCheckWebRequest .Method = " POST" ;
425
- spellCheckWebRequest .ContentType = " app /x-www-form-urlencoded" ; // doesn't work without this
425
+ spellCheckWebRequest .ContentType = " application /x-www-form-urlencoded" ; // doesn't work without this
426
426
427
427
// Create and send the request
428
428
string body = " text=" + System .Web .HttpUtility .UrlEncode (text );
You can’t perform that action at this time.
0 commit comments