Closed Psypher9 closed 5 years ago
I don't think this class is actually being helpful. Here is our code:
public static class RestSharpExtensions { public static bool IsSuccessful(this IRestResponse response) { return (int) response.StatusCode >= 200 && (int) response.StatusCode <= 299 && response.ResponseStatus == ResponseStatus.Completed; } }
and here is the IsSuccessful method from RestSharp Response class directly
IsSuccessful
public bool IsSuccessful => (int) StatusCode >= 200 && (int) StatusCode <= 299 && ResponseStatus == ResponseStatus.Completed;
These do the exact same thing. So it would be best to drop this class entirely unless there is a need for it.
created PR for this #40
I don't think this class is actually being helpful. Here is our code:
and here is the
IsSuccessful
method from RestSharp Response class directlyThese do the exact same thing. So it would be best to drop this class entirely unless there is a need for it.