优化细节
This commit is contained in:
parent
2ae8789fef
commit
c7ce482511
1 changed files with 4 additions and 4 deletions
|
@ -92,17 +92,17 @@ func (s *StdAns) SendMsg(msg string) bool {
|
||||||
fmt.Println("Error marshaling JSON:", err)
|
fmt.Println("Error marshaling JSON:", err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
re, err := json.MarshalIndent(requestBody, "", " ")
|
_, err = json.MarshalIndent(requestBody, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error marshaling JSON:", err)
|
fmt.Println("Error marshaling JSON:", err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
fmt.Println(string(re))
|
// fmt.Println(string(re))
|
||||||
|
|
||||||
url := config.GlobalConfig.Server.POSTURL
|
url := config.GlobalConfig.Server.POSTURL
|
||||||
// println("core:", url)
|
// println("core:", url)
|
||||||
fmt.Println("请求地址:", url)
|
// fmt.Println("请求地址:", url)
|
||||||
fmt.Println("响应信息:", msg)
|
fmt.Println("响应信息:\n", msg)
|
||||||
resp, err := http.Post(url, "application/json", bytes.NewBuffer(requestBody))
|
resp, err := http.Post(url, "application/json", bytes.NewBuffer(requestBody))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error sending request:", err)
|
fmt.Println("Error sending request:", err)
|
||||||
|
|
Loading…
Reference in a new issue