golang http请求如何设置代理
u, _ := url.Parse("htttp://127.0.0.1:7890")
t := &http.Transport{
MaxIdleConns: 10,
MaxConnsPerHost: 10,
IdleConnTimeout: time.Duration(10) * time.Second,
//Proxy: (url),
Proxy: http.ProxyURL(u),
}
c := &http.Client{
Transport: t,
Timeout: time.Duration(10) * time.Second,
}
client, err := playstore.NewWithClient(jsonKey, c)
if err != nil {
log.Fatal(err)
}