我试图弄清楚这两种方法之间的区别, ReadAsAsync()和ReadAsStringAsync()
public static string ContentAsString(this HttpResponseMessage response)
{
var data = response.Content.ReadAsAsync<string>().Result;
var data2 = response.Content.ReadAsStringAsync().Result;
return data;
}
数据返回“测试”
data2返回“ \” test \“”
为什么ReadAsStringAsync返回“ \ \”?