图灵API

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("和我说点什么吧?");
while (true)
{
string str= Console.ReadLine();
string url = @"http://www.tuling123.com/openapi/api?key=**********&info="+str;
HttpClient httpClient = new HttpClient();
var response = httpClient.GetAsync(new Uri(url)).Result;
string result = response.Content.ReadAsStringAsync().Result;
date de = JsonConvert.DeserializeObject<date>(result);
Console.WriteLine(de.text);
}
}
}
public class date
{
public int code { get; set; }
public string text { get; set; }
}
}
上一篇:ios 存储学习笔记


下一篇:[SDOI2009]HH的项链-树状数组/线段树