Hello,
I am trying to use HttpClient and I keep getting a resource temporarily unavailable exception. It works fine as a console app but when I try using the Wearable emulator 5.5 keep getting the exception:
var json = JsonConvert.SerializeObject(new UserCredentials { Username = user, }); var data = new StringContent(json, Encoding.UTF8, "application/json"); var url = Constants.AuthUrl + "Login"; var client = new HttpClient(); try { var response = client.PostAsync(url, data).Result; response.EnsureSuccessStatusCode(); return true; } catch (Exception e) { return false; }
It keeps falling under the catch exception: “One or more errors occurred. (Resource temporarily unavailable)”
Do I need to configure something to enable api calls such as in the manifest or elsewhere or this library is not supported?
Privilages I have added:
/internet
/network.get