MCPcopy Create free account
hub / github.com/imroc/req / NoRedirectPolicy

Function NoRedirectPolicy

redirect.go:30–34  ·  view source on GitHub ↗

NoRedirectPolicy disable redirect behaviour

()

Source from the content-addressed store, hash-verified

28
29// NoRedirectPolicy disable redirect behaviour
30func NoRedirectPolicy() RedirectPolicy {
31 return func(req *http.Request, via []*http.Request) error {
32 return http.ErrUseLastResponse
33 }
34}
35
36// SameDomainRedirectPolicy allows redirect only if the redirected domain
37// is the same as original domain, e.g. redirect to "www.imroc.cc" from

Callers 1

TestRedirectFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRedirectFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…