mirror of https://gitea.com/gitea/go-sdk.git
Fix NewClientWithHTTP (#192)
This commit is contained in:
parent
e41e9ea72c
commit
2a5a0e75e5
|
@ -39,9 +39,10 @@ func NewClient(url, token string) *Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClientWithHTTP creates an API client with a custom http 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 := NewClient(url, "")
|
||||||
client.client = httpClient
|
client.client = httpClient
|
||||||
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHTTPClient replaces default http.Client with user given one.
|
// SetHTTPClient replaces default http.Client with user given one.
|
||||||
|
|
Loading…
Reference in New Issue