Skip to content

Instantly share code, notes, and snippets.

@DavidSSL
Created March 20, 2013 12:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSSL/5204302 to your computer and use it in GitHub Desktop.
Save DavidSSL/5204302 to your computer and use it in GitHub Desktop.
ReadAsJsonAsync
public static Task<dynamic> ReadAsJsonAsync(this HttpContent content)
{
if (content == null)
throw new ArgumentNullException("content");
return content.ReadAsStringAsync().ContinueWith(t =>
JsonConvert.DeserializeObject(t.Result));
}
@kiquenet
Copy link

real world sample using it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment