/** * 同步的请求接口 */ protected virtual void ExecuteSyncRequest(HttpWebRequest request) { try { HttpWebResponse response = request.GetResponse() as HttpWebResponse; if (action.Success != null) { action.Success(response.Headers, response.GetResponseStream()); } } catch (WebException ex) { if (action.Fail != null) { action.Fail(ex); } } }