Retry an http request handling classes of statuses and errors