var json = await http.GetStringAsync(uri);
this works on both windows store, windows phone and windows form app, however the following code only works on windows store and windows form app, not on windows phone. The getAsync never returns. Does anyone know the reason? Is there a bug in the implementation of the PCL for windows phone?
var response = http.GetAsync(uri).Result;
response.EnsureSuccessStatusCode();
string json = await response.Content.ReadAsStringAsync();
You should not block on async
code; there is the possibility of a deadlock, as I describe on my blog.