func (hhc *Client) Do(request *http.Request) (*http.Response, error) {
	request.Close = true

	var response *http.Response
	var err error

	for i := 0; i <= hhc.retryCount; i++ {
		err = hystrix.Do(hhc.hystrixCommandName, func() error {
			response, err = hhc.client.Do(request)
			if err != nil {
				return err
			}

			if response.StatusCode >= http.StatusInternalServerError {
				return fmt.Errorf("Server is down: returned status code: %d", response.StatusCode)
			}
			return nil
		}, hhc.fallbackFunc)

		if err != nil {
			backoffTime := hhc.retrier.NextInterval(i)
			time.Sleep(backoffTime)
			continue
		}

		break
	}

	return response, err
}
// Do makes an HTTP request with the native `http.Do` interface
Do makes an HTTP request with the native `http.Do` interface
// Do makes an HTTP request with the native ` http . Do ` interface
func (hhc *Client) Do(request *http.Request) (*http.Response, error) {
	request.Close = true
	var response *http.Response
	var err error
	for i := 0; i <= hhc.retryCount; i++ {
		err = hystrix.Do(hhc.hystrixCommandName, func() error {
			response, err = hhc.client.Do(request)
			if err != nil {
				return err
			}
			if response.StatusCode >= http.StatusInternalServerError {
				return fmt.Errorf("Server is down: returned status code: %d", response.StatusCode)
			}
			return nil
		}, hhc.fallbackFunc)
		if err != nil {
			backoffTime := hhc.retrier.NextInterval(i)
			time.Sleep(backoffTime)
			continue
		}
		break
	}
	return response, err
}
func ( hhc * Client ) Do ( request * http . Request ) ( * http . Response , error ) { request . Close = true var response * http . Response var err error for i := 0 ; i <= hhc . retryCount ; i ++ { err = hystrix . Do ( hhc . hystrixCommandName , func ( ) error { response , err = hhc . client . Do ( request ) if err != nil { return err } if response . StatusCode >= http . StatusInternalServerError { return fmt . Errorf ( " " , response . StatusCode ) } return nil } , hhc . fallbackFunc ) if err != nil { backoffTime := hhc . retrier . NextInterval ( i ) time . Sleep ( backoffTime ) continue } break } return response , err }
Do makes an HTTP request with the native `http.Do` interface
Do makes an HTTP request with the native ` http . Do ` interface