mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-20 03:58:32 -04:00
use the http transport on the registry to support -k (#77)
This commit is contained in:
parent
64124a70bf
commit
17625873c8
|
@ -118,7 +118,12 @@ func isTokenDemand(resp *http.Response) (*authService, error) {
|
|||
func (r *Registry) Token(url string) (string, error) {
|
||||
r.Logf("registry.token url=%s", url)
|
||||
|
||||
resp, err := http.Get(url)
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
resp, err := r.Client.Do(req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue