Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type Client struct {
mu sync.Mutex
EncodingBase64 bool
Connected bool
Request *http.Request
}

// NewClient creates a new client
Expand Down Expand Up @@ -293,6 +294,10 @@ func (c *Client) request(ctx context.Context, stream string) (*http.Response, er
if err != nil {
return nil, err
}
// Override request with provided request
if c.Request != nil {
req = c.Request
}
req = req.WithContext(ctx)

// Setup request, specify stream to connect to
Expand Down