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>()); }
public static Dictionary <string, string> Errors(this IRestResponse response) => response.DeserializeTo <Dictionary <string, string> >();