Created
January 25, 2017 12:06
-
-
Save shammelburg/aedaada2677014670599c18e60212324 to your computer and use it in GitHub Desktop.
Using HttpClient and Deserialize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var client = new HttpClient()) | |
{ | |
var data = client.GetAsync(new Uri($"{AppSettingsHelper.api_url}/Controller/Action?Parameter={variable}")).Result; | |
string json = data.Content.ReadAsStringAsync().Result; | |
list = JsonConvert.DeserializeObject<List<ViewModel>>(json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment