HttpClient Error getting response stream (ReadDone

2019-06-12 04:05发布

问题:

I am using HttpClient class to make a web request to get data from server( httpClient.GetAsync(url, HttpCompletionOption.ResponseContentRead). But randomly i get this error saying Error getting response stream (ReadDone1): ReceiveFailure I have a try catch block around this call but it does not get caught. Instead I get the error in UIApplication.Main(args, null, "AppDelegate"); in the IOS App. Is there any way to catch this error or to fix this error?

回答1:

Are you using ModernHttpClient? If not, give it a shot. It's available as a component and on github. It's a drop in replacement for HttpClient that performs a lot better.