From 01dfc8e2ed7c98e182c8f640ba303ca4ae984ee0 Mon Sep 17 00:00:00 2001 From: sscsdl Date: Sat, 9 Nov 2024 22:43:47 +0800 Subject: [PATCH] paypal adds http.Client option (#427) --- paypal/client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paypal/client.go b/paypal/client.go index ce74c025..db7210b2 100644 --- a/paypal/client.go +++ b/paypal/client.go @@ -64,6 +64,13 @@ func WithProxyUrl(proxyUrlProd, proxyUrlSandbox string) Option { } } +// WithHttpClient 设置自定义的xhttp.Client +func WithHttpClient(client *xhttp.Client) Option { + return func(c *Client) { + c.hc = client + } +} + // SetBodySize 设置http response body size(MB) func (c *Client) SetBodySize(sizeMB int) { if sizeMB > 0 {