wechatpay-go icon indicating copy to clipboard operation
wechatpay-go copied to clipboard

自定义 Downloader 使用的 Client

Open EmmetZC opened this issue 2 years ago • 0 comments

在使用 WithWechatPayAutoAuthCipher 创建 core.Client 时,会自动在 MgrInstance() 中新增一个 Downloader(如果不存在该商户的Downloader的话)。

这个Downloader是独立新建了一个 core.Client,这个时候如果开发者想要自定义 Downloader 使用的 core.Client(一般情况下是希望自定义其使用的 http.Client),就需要再次调用 MgrInstance().RegisterDownloader 方法重新注册一次 Downloader

这个过程很不友好,而且需要对SDK有充分的了解才会知道应该这么做。

需要有办法让这个过程,至少是「知道应该怎么做」的过程,更加清楚。

EmmetZC avatar Sep 27 '21 09:09 EmmetZC