Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] SMS 无法自定义 HTTP Client #140

Open
shuqingzai opened this issue Aug 17, 2024 · 0 comments
Open

[Feature] SMS 无法自定义 HTTP Client #140

shuqingzai opened this issue Aug 17, 2024 · 0 comments

Comments

@shuqingzai
Copy link

shuqingzai commented Aug 17, 2024

SMS 服务初始化只提供 NewManager ,不支持传递自定义的 HTTPClient 且 client 是私有属性,无法自定义修改
参考:

go-sdk/sms/manager.go

Lines 23 to 39 in 6da001b

func NewManager(mac *auth.Credentials) (manager *Manager) {
manager = &Manager{}
if mac == nil {
mac = auth.Default()
}
mac1 := &client.Mac{
AccessKey: mac.AccessKey,
SecretKey: mac.SecretKey,
}
transport := client.NewTransport(mac1, nil)
manager.client = rpc.Client{Client: &http.Client{Transport: transport}}
return
}

期望可以像 [storage] 相关服务初始化一样提供自定义 HTTPClient 的方法
参考:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant