You've already forked CasaOS
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:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user