src/index.js
function single (url, options = {}) {
  let tries = 1

  // Execute the request and retry if there are errors (and the
  // retry decider decided that we should try our luck again)
  const callRequest = () => request(url, options).catch(err => {
    if (internalRetry(++tries, err)) {
      return wait(callRequest, internalRetryWait(tries))
    }

    throw err
  })

  return callRequest()
}
function single (url, options = {}) {
  let tries = 1

  // Execute the request and retry if there are errors (and the
  // retry decider decided that we should try our luck again)
  const callRequest = () => request(url, options).catch(err => {
    if (internalRetry(++tries, err)) {
      return wait(callRequest, internalRetryWait(tries))
    }

    throw err
  })

  return callRequest()
}
function single ( url , options = { } ) { let tries = 1 // Execute the request and retry if there are errors (and the // retry decider decided that we should try our luck again) const callRequest = ( ) => request ( url , options ) . catch ( err => { if ( internalRetry ( ++ tries , err ) ) { return wait ( callRequest , internalRetryWait ( tries ) ) } throw err } ) return callRequest ( ) }
Request a single url
Request a single url