修复读取超时单位错误问题

This commit is contained in:
zhangdeman001 2023-03-10 16:08:29 +08:00
parent ae2731ca9d
commit 64d697d972

View File

@ -164,7 +164,7 @@ func getHttpClient(apiConfig *ApiRequestConfig, header map[string]string) *httpc
fullHeader["content-type"] = apiConfig.ContentType fullHeader["content-type"] = apiConfig.ContentType
return httpclient.NewHttpClient().WithHeaders(fullHeader). return httpclient.NewHttpClient().WithHeaders(fullHeader).
WithOption(httpclient.OPT_CONNECTTIMEOUT_MS, time.Duration(apiConfig.Timeout.Connect)*time.Millisecond). WithOption(httpclient.OPT_CONNECTTIMEOUT_MS, time.Duration(apiConfig.Timeout.Connect)*time.Millisecond).
WithOption(httpclient.OPT_TIMEOUT, time.Duration(apiConfig.Timeout.Read)*time.Millisecond) WithOption(httpclient.OPT_TIMEOUT_MS, time.Duration(apiConfig.Timeout.Read)*time.Millisecond)
} }
// buildRequestURLAndParam 构建完整请求URL与请求参数 // buildRequestURLAndParam 构建完整请求URL与请求参数