Skip to content

Commit 91ba3c1

Browse files
committed
[chore][client] Add ability to override the http.Client
1 parent a0e968a commit 91ba3c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/sse.go

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ type SSEMCPClient struct {
4141

4242
type ClientOption func(*SSEMCPClient)
4343

44+
func WithHTTPClient(httpClient *http.Client) ClientOption {
45+
return func(sc *SSEMCPClient) {
46+
sc.httpClient = httpClient
47+
}
48+
}
49+
4450
func WithHeaders(headers map[string]string) ClientOption {
4551
return func(sc *SSEMCPClient) {
4652
sc.headers = headers

0 commit comments

Comments
 (0)