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

允许用户使用自定义的http.Client? #167

Open
ricklxm opened this issue May 10, 2022 · 1 comment
Open

允许用户使用自定义的http.Client? #167

ricklxm opened this issue May 10, 2022 · 1 comment

Comments

@ricklxm
Copy link

ricklxm commented May 10, 2022

如下的代码中使用了硬编码的http.Client,能否使其允许调用方可以传递自定义的http.Client?

func (c JDCloudClient) doSend(method, url, data string, header map[string]string, timeout time.Duration, sign SignFunc) ([]byte, error) {
	client := &http.Client{Timeout: timeout}

	req, err := http.NewRequest(method, url, strings.NewReader(data))
	// ... 
}
@shijunLee
Copy link
Collaborator

目前是不支持的,您的具体需求是什么,或者遇到什么问题,我们可以考虑支持一下

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

2 participants