Replies: 1 comment
-
1 - The exception should be System.Net.Http.HttpRequestException, as you use HttpClient to make a request to a web service. |
Beta Was this translation helpful? Give feedback.
-
1 - The exception should be System.Net.Http.HttpRequestException, as you use HttpClient to make a request to a web service. |
Beta Was this translation helpful? Give feedback.
-
Hi Xamarin.Forms Community,
I'm trying to figure out if the following behaviour is common to all and how other developers managed this kind of situation.
In my application I use HttpClient to make request to a web service; the HttpClient object is created with a specific timeout (example 15 seconds).
If the server doesn't respond in the amount of time specified by the Timeout property an exception is thrown.
The problem is that the exception thrown is of type Java.Net.SocketException, and I cannot catch this specific exception. I could catch only with generic type "Exception".
So the question are:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions