Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop RestSharpExtensions #39

Closed
Psypher9 opened this issue Oct 24, 2018 · 1 comment
Closed

Drop RestSharpExtensions #39

Psypher9 opened this issue Oct 24, 2018 · 1 comment
Labels
1.0.0 good first issue Good for newcomers
Projects

Comments

@Psypher9
Copy link
Member

Psypher9 commented Oct 24, 2018

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

        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.

@Psypher9 Psypher9 added good first issue Good for newcomers 1.0.0 labels Oct 24, 2018
@Psypher9 Psypher9 added this to To do in 1.0.0 via automation Oct 24, 2018
@michal880
Copy link
Contributor

michal880 commented Oct 28, 2018

created PR for this #40

@Psypher9 Psypher9 closed this as completed Jun 3, 2019
1.0.0 automation moved this from To do to Done Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.0 good first issue Good for newcomers
Projects
1.0.0
  
Done
Development

No branches or pull requests

2 participants