具体微信返回错误:
Post https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=WbydbNY8e6B2UHhaI0EliHR-bPav66gwsr0Gwka0nggTnRRSwLHh_4TwaFuQLM6DCsi3pAxfl3TaR85fblxTVwSbQVuWS4l9AF3KJPZcjyNvdOX7XA9EBQqs8yCndAR_YJKbAEANYZ: dial tcp: lookup api.weixin.qq.com on 119.29.29.29:53: dial udp 119.29.29.29:53: i/o timeout
post代码:
c := &http.Client{
// Timeout: 10 * time.Second,
Transport: &http.Transport{
Dial: (&net.Dialer{
Timeout: 2 * time.Second,
KeepAlive: 2 * time.Second,
}).Dial,
TLSHandshakeTimeout: 2 * time.Second,
ResponseHeaderTimeout: 2 * time.Second,
ExpectContinueTimeout: 2 * time.Second,
},
}
res, err := c.Post(url, "application/json",
body)
有疑问加站长微信联系(非本文作者)