Yeah, I agree, default should be to just return 202, and then an optional param for enabling 202 handling. I'll see if I can come up with a good name for it.

On Jul 31, 2013, at 1:23 PM, Johannes Plunien <notifications@github.com> wrote:

> In lib/Pithub/Repos/Stats.pm:
> 
> > +        method => 'GET',
> > +        path => sprintf(
> > +            '/repos/%s/%s/stats/contributors',
> > +            delete $args{user}, delete $args{repo}
> > +        ),
> > +        %args
> > +    };
> > +    my $res = $self->request(
> > +        %$req
> > +    );
> > +
> > +    while ($res->response->code == 202) {
> > +        warn "202 response, sleeping and redoing..";
> > +        sleep 5;
> > +        $res = $self->request(%$req);
> > +    }
> That would be an option. I'd prefer the default behaviour to just return the 202 though. Only if the users sets this special argument it does the sleep magic. Maybe the value of this argument (I can't come up with a proper name yet) could be the sleep interval?
> 
> —
> Reply to this email directly or view it on GitHub.
>