Performs a HTTP call, retrying if necessary.