square/retrofit — pull request #268 by adriancole (2013-07-11 15:40:25+00:00)
Title: implement Retryer for transient error resolution

Allows you to throw a `RetryableError` from your ErrorHandler when a response implies a retry.

Ex.
```
new ErrorHandler() {
@Override public Throwable handleError(RetrofitError cause) {
Response r = cause.getResponse();
if (r.getStatus() == 500) {
return new RetryableError(cause);
}
return cause;
}
};
```
Default `Retryer` exponentially backs off up to 5 times, unless the `retryAfter` field is set in the `RetryableError`.