Skip to content

Commit 438ef94

Browse files
authored
HTTPClientTransport WithClient (#113)
1 parent d8db359 commit 438ef94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

transport/http/http_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ func (t *HTTPClientTransport) WithHeader(key, value string) *HTTPClientTransport
4545
return t
4646
}
4747

48+
// WithClient sets the HTTP client to use for requests
49+
func (t *HTTPClientTransport) WithClient(client *http.Client) *HTTPClientTransport {
50+
t.client = client
51+
return t
52+
}
53+
4854
// Start implements Transport.Start
4955
func (t *HTTPClientTransport) Start(ctx context.Context) error {
5056
// Does nothing in the stateless http client transport

0 commit comments

Comments
 (0)