MCPcopy Create free account
hub / github.com/gogs/gogs / SetCheckRedirect

Method SetCheckRedirect

internal/httplib/httplib.go:161–164  ·  view source on GitHub ↗

SetCheckRedirect sets the policy invoked by the underlying HTTP client before following a redirect. See http.Client.CheckRedirect for semantics.

(fn func(req *http.Request, via []*http.Request) error)

Source from the content-addressed store, hash-verified

159// SetCheckRedirect sets the policy invoked by the underlying HTTP client before
160// following a redirect. See http.Client.CheckRedirect for semantics.
161func (r *Request) SetCheckRedirect(fn func(req *http.Request, via []*http.Request) error) *Request {
162 r.setting.CheckRedirect = fn
163 return r
164}
165
166// Header add header item string in request.
167func (r *Request) Header(key, value string) *Request {

Callers 1

deliverMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected