我在下面有一个代码可以得到回复HTTP GET
:
private void ResponseReady(IAsyncResult aResult)
{
HttpWebRequest request = aResult.AsyncState as HttpWebRequest;
try
{
this.Dispatcher.BeginInvoke(delegate()
{
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(aResult);
没有连接时的问题,它会停在该response
行。它没有捕捉到异常。Dispatcher.Invoke
是不是因为