We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a383457 commit e5bdd84Copy full SHA for e5bdd84
httpclient/httpclient.go
@@ -0,0 +1,25 @@
1
+package httpclient
2
+
3
+import (
4
+ "net/http"
5
+)
6
7
+// New returns a default http client for use in the cli API calls
8
+func New() (*http.Client, error) {
9
+ config, err := DefaultConfig()
10
11
+ if err != nil {
12
+ return nil, err
13
+ }
14
15
+ return NewWithConfig(config), nil
16
+}
17
18
+// NewWithConfig creates a http client for use in the cli API calls with a given configuration
19
+func NewWithConfig(config *Config) *http.Client {
20
+ transport := newHTTPClientTransport(config)
21
22
+ return &http.Client{
23
+ Transport: transport,
24
25
0 commit comments