func GetRetryAfter(resp *http.Response, defaultDelay time.Duration) time.Duration {
	retry := resp.Header.Get(HeaderRetryAfter)
	if retry == "" {
		return defaultDelay
	}
	d, err := time.ParseDuration(retry + "s")
	if err != nil {
		return defaultDelay
	}
	return d
}
GetRetryAfter extracts the retry delay from the Retry-After header of the passed response. If
the header is absent or is malformed, it will return the supplied default delay time.Duration.
package autorest
import (
	"context"
	"net/http"
	"time"
)
const (
	HeaderLocation = "Location"
	HeaderRetryAfter = "Retry-After"
)
func ResponseHasStatusCode(resp *http.Response, codes ...int) bool {
	if resp == nil {
		return false
	}
	return containsInt(codes, resp.StatusCode)
}
func GetLocation(resp *http.Response) string {
	return resp.Header.Get(HeaderLocation)
}