Exemple #1
0
 public static T CheckStatusCodeAndDeserializeTo <T>(this IRestResponse response, HttpStatusCode statusCode)
 {
     if (response.StatusCode != statusCode)
     {
         throw new HttpException($"Unexpected http status code: {response.StatusCode}. Expected: {statusCode}");
     }
     return(response.DeserializeTo <T>());
 }
Exemple #2
0
 public static Dictionary <string, string> Errors(this IRestResponse response)
 => response.DeserializeTo <Dictionary <string, string> >();