Skip to content

Commit b0f7a73

Browse files
committed
[streamable-http] Add ability to override the http.Client
1 parent ca9be6e commit b0f7a73

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/transport/streamable_http.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ import (
2121

2222
type StreamableHTTPCOption func(*StreamableHTTP)
2323

24+
func WithHTTPBasicClient(client *http.Client) StreamableHTTPCOption {
25+
return func(sc *StreamableHTTP) {
26+
sc.httpClient = client
27+
}
28+
}
29+
2430
func WithHTTPHeaders(headers map[string]string) StreamableHTTPCOption {
2531
return func(sc *StreamableHTTP) {
2632
sc.headers = headers

0 commit comments

Comments
 (0)