在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
req, err := http.NewRequest(c.method, c.url, reader) if err != nil { return nil, err } req.Header = c.Header req.Header.Set("Content-Type", c.ContentType) c.HttpClient.Transport = c.Transport return req, nil }() if err != nil { c.Errors = append(c.Errors, err) return nil, nil, c.Errors } if c.Timeout != time.Duration(0) { c.HttpClient.Timeout = c.Timeout } if c.Host != "" { req.Host = c.Host } res, err = c.HttpClient.Do(req) if err != nil { c.Errors = append(c.Errors, err) return nil, nil, c.Errors } defer res.Body.Close()
|
请发表评论