Golang HTTP Client - How to not follow redirects

Oct, 2018

client: &http.Client{
    CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
    },
}

client.Do(req) ...