try { var actionURI = new Uri("https://api.datamarket.azure.com/data.ashx/amla/text-analytics/v1/GetKeyPhrases"); DataServiceContext context = new DataServiceContext(actionURI); var accountKey = "testkey"; var cred = new NetworkCredential(accountKey, accountKey); var cache = new CredentialCache(); cache.Add(actionURI, "Basic", cred); context.Credentials = cache; DataServiceQuery<string> query = context.CreateQuery<string>("GetKeyPhrases"); query.AddQueryOption("Text", string.Concat("\'", System.Uri.EscapeDataString("Hello World"), "\'")); List<string> test = query.Execute().ToList<string>(); } catch (Exception ex) { Console.WriteLine(ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)