resty
resty copied to clipboard
Feature Request: export `NoRedirectPolicy`'s error
this is what we do to know it's a redirect problem:
resp, err := h.R().SetResult(&r).Get(...)
if err != nil {
if err.Error() == "auto redirect is disabled" {
return APISubject{}, errSkip
}
panic(err)
}
if the error of NoRedirectPolicy
is exported, we can use errors.Is(err, resty.ErrNotAllowed)
to match the error.