Fix NewClientWithHTTP (#192)
This commit is contained in:
parent
e41e9ea72c
commit
2a5a0e75e5
1 changed files with 2 additions and 1 deletions
|
@ -39,9 +39,10 @@ func NewClient(url, token string) *Client {
|
|||
}
|
||||
|
||||
// NewClientWithHTTP creates an API client with a custom http client
|
||||
func NewClientWithHTTP(url string, httpClient *http.Client) {
|
||||
func NewClientWithHTTP(url string, httpClient *http.Client) *Client {
|
||||
client := NewClient(url, "")
|
||||
client.client = httpClient
|
||||
return client
|
||||
}
|
||||
|
||||
// SetHTTPClient replaces default http.Client with user given one.
|
||||
|
|
Loading…
Reference in a new issue