diff --git a/pkg/uhttp/wrapper.go b/pkg/uhttp/wrapper.go index 9be18431..9a3dff33 100644 --- a/pkg/uhttp/wrapper.go +++ b/pkg/uhttp/wrapper.go @@ -57,9 +57,12 @@ type ( ) func NewBaseHttpClient(httpClient *http.Client) *BaseHttpClient { - return &BaseHttpClient{ - HttpClient: httpClient, + ctx := context.TODO() + client, err := NewBaseHttpClientWithContext(ctx, httpClient) + if err != nil { + return nil } + return client } func NewBaseHttpClientWithContext(ctx context.Context, httpClient *http.Client) (*BaseHttpClient, error) {