This commit is contained in:
macbook-maxwell 2024-10-08 20:39:16 +08:00
parent 5fdbe419c1
commit 757918798c

View File

@ -217,6 +217,7 @@ func fetchTokenFromAPI(username, password string) (string, error) {
"password": password, "password": password,
} }
reqBodyJson, _ := json.Marshal(reqBody) reqBodyJson, _ := json.Marshal(reqBody)
fmt.Println(string(reqBodyJson))
returnValue, err := http.Post(url, "application/json", bytes.NewBuffer(reqBodyJson)) returnValue, err := http.Post(url, "application/json", bytes.NewBuffer(reqBodyJson))
if err != nil { if err != nil {
return "", errors.New("获取token失败") return "", errors.New("获取token失败")