You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
Determine the hole punching technique
This commit is contained in:
@ -16,9 +16,9 @@ import (
|
||||
//url:请求地址
|
||||
//response:请求返回的内容
|
||||
func Get(url string, head map[string]string) (response string) {
|
||||
client := http.Client{Timeout: 30 * time.Second}
|
||||
client := &http.Client{Timeout: 30 * time.Second}
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
req.BasicAuth()
|
||||
|
||||
for k, v := range head {
|
||||
req.Header.Add(k, v)
|
||||
}
|
||||
|
Reference in New Issue
Block a user