mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-04 15:57:44 +00:00
Update go-nc-talk (nctalk) (#1333)
Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
18
vendor/github.com/monaco-io/request/build.go
generated
vendored
18
vendor/github.com/monaco-io/request/build.go
generated
vendored
@ -14,17 +14,18 @@ func (c *Client) buildRequest() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
c.transport = &http.Transport{}
|
||||
|
||||
c.applyHTTPHeader()
|
||||
c.applyBasicAuth()
|
||||
c.applyClient()
|
||||
c.applyTimeout()
|
||||
c.applyCookies()
|
||||
// Apply transport needs to be called before TLSConfig as TLSConfig modifies
|
||||
// the http transport
|
||||
c.applyTransport()
|
||||
c.applyTLSConfig()
|
||||
err = c.applyProxy()
|
||||
|
||||
c.client.Transport = c.transport
|
||||
c.client.Transport = c.Transport
|
||||
return
|
||||
}
|
||||
|
||||
@ -84,15 +85,20 @@ func (c *Client) applyProxy() (err error) {
|
||||
if proxy, err = url.Parse(c.ProxyURL); err != nil {
|
||||
return
|
||||
} else if proxy != nil {
|
||||
c.transport.Proxy = http.ProxyURL(proxy)
|
||||
c.Transport.Proxy = http.ProxyURL(proxy)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) applyTLSConfig() {
|
||||
// &tls.Config{InsecureSkipVerify: true}
|
||||
if c.TLSConfig != nil {
|
||||
c.transport.TLSClientConfig = c.TLSConfig
|
||||
c.Transport.TLSClientConfig = c.TLSConfig
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) applyTransport() {
|
||||
if c.Transport == nil {
|
||||
c.Transport = &http.Transport{}
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/monaco-io/request/model.go
generated
vendored
2
vendor/github.com/monaco-io/request/model.go
generated
vendored
@ -39,12 +39,12 @@ type Client struct {
|
||||
ContentType ContentType
|
||||
Cookies []*http.Cookie
|
||||
TLSConfig *tls.Config
|
||||
Transport *http.Transport
|
||||
|
||||
// private
|
||||
client *http.Client
|
||||
requestURL requestURL
|
||||
req *http.Request
|
||||
transport *http.Transport
|
||||
}
|
||||
|
||||
// BasicAuth Add Username:Password as Basic Auth
|
||||
|
Reference in New Issue
Block a user