I hereby claim:
- I am saintbr on github.
- I am saintbr (https://keybase.io/saintbr) on keybase.
- I have a public key ASCqlu9WtDHhvkiTZ_v4-xpxYXmexbViuSWeZLrPI_XI0wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
internal static class HttpContentExtensions | |
{ | |
public static T As<T>(this HttpContent content) where T : class | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(content.ReadAsStringAsync().Result); | |
} | |
} | |
#USAGE | |
new HttpClient().GetAsync("[ENDPOINT]").Result.Content.As<T>(); |