插件-云闪付红包,查询增加请求超时

This commit is contained in:
李子铭 2024-08-22 10:54:04 +08:00
parent aba1f541f5
commit 652297ffcc
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ func (p *UnionPayCpnService) Query(ctx context.Context, request *proto.QueryRequ
url := fmt.Sprintf("%s%s", c.BaseUri, queryMethod) url := fmt.Sprintf("%s%s", c.BaseUri, queryMethod)
h := new(http.Client) h := new(http.Client)
h.Timeout = 100 * time.Millisecond h.Timeout = 20 * time.Second
err = requests.URL(url).Client(h).Headers(headers(c, uv, queryBizMethod)).BodyJSON(uv).ToJSON(&response).Fetch(ctx) err = requests.URL(url).Client(h).Headers(headers(c, uv, queryBizMethod)).BodyJSON(uv).ToJSON(&response).Fetch(ctx)
if err != nil { if err != nil {
return nil, fmt.Errorf("请求异常msg:" + err.Error()) return nil, fmt.Errorf("请求异常msg:" + err.Error())