Skip to content

Commit

Permalink
🎸 Optimize http method supported local env proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cairry committed Dec 18, 2024
1 parent e5924ea commit 4492403
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tools/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func Get(headers map[string]string, url string, timeout int) (*http.Response, er
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
Proxy: http.ProxyFromEnvironment,
}

client := http.Client{
Expand Down Expand Up @@ -45,6 +46,7 @@ func Post(headers map[string]string, url string, bodyReader *bytes.Reader, timeo
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
Proxy: http.ProxyFromEnvironment,
}

client := http.Client{
Expand Down

0 comments on commit 4492403

Please sign in to comment.