我无法打印或处理发出HTTP请求后收到的数据。 这是我写的代码:
private void Button_Click(object sender, RoutedEventArgs e)
{
String jsonUri = "hxxp://xxxxx/zzzz/yyyyyy; //censured
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(jsonUri);
request.BeginGetResponse(GetDataCallback, request);
}
void GetDataCallback(IAsyncResult result)
{
HttpWebRequest request = result.AsyncState as HttpWebRequest;
if (request != null)
{
WebResponse response = request.EndGetResponse(result);
testo.Text = response.GetResponseStream().ToString();
}
}
我尝试了各种解决方案,但我无法打印结果。 apache我看到了调用,来自应用程序的数据我可以看到即将到来的