Created
March 20, 2013 12:31
-
-
Save DavidSSL/5204302 to your computer and use it in GitHub Desktop.
ReadAsJsonAsync
This file contains 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
public static Task<dynamic> ReadAsJsonAsync(this HttpContent content) | |
{ | |
if (content == null) | |
throw new ArgumentNullException("content"); | |
return content.ReadAsStringAsync().ContinueWith(t => | |
JsonConvert.DeserializeObject(t.Result)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
real world sample using it ?