1
0
mirror of https://github.com/IceWhaleTech/CasaOS.git synced 2025-07-15 23:54:17 +02:00

Add CasaConnect function

This commit is contained in:
link
2022-04-06 12:10:51 +08:00
parent c3b2c1d599
commit dd0645ee0f
61 changed files with 9457 additions and 8454 deletions

View File

@ -3,6 +3,7 @@ package httper
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
@ -67,7 +68,8 @@ func Post(url string, data []byte, contentType string, head map[string]string) (
client := &http.Client{Timeout: 5 * time.Second}
resp, error := client.Do(req)
if error != nil {
panic(error)
fmt.Println(error)
return
}
defer resp.Body.Close()