public static T GetObject <T>(this HttpResponseMessage responseMessage) { var response = responseMessage.Content.ReadAsStringAsync().Result; return(ClientSerializer.Deserialize <T>(response)); }
public static HttpContent ToJsonContent <T>(this T @object) { var jsonString = ClientSerializer.Serialize(@object); return(new StringContent(jsonString, System.Text.Encoding.UTF8, "application/json")); }