浏览代码

refactor: use httputil.NewClientWithDriver func

ayn2op 7 月之前
父节点
当前提交
93f6873ffc
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      internal/http/client.go

+ 1 - 2
internal/http/client.go

@@ -9,9 +9,8 @@ import (
 )
 
 func NewClient(token string) *api.Client {
-	httpClient := httputil.NewClient()
 	stdClient := http.DefaultClient
 	stdClient.Transport = NewTransport()
-	httpClient.Client = httpdriver.WrapClient(*stdClient)
+	httpClient := httputil.NewClientWithDriver(httpdriver.WrapClient(*stdClient))
 	return api.NewCustomClient(token, httpClient)
 }