Added error handling if SCG returns non-200 HTTP status code

This commit is contained in:
flygrounder 2020-02-27 10:41:03 +03:00
parent d422f63f9c
commit 33ba48c968
3 changed files with 26 additions and 5 deletions

View file

@ -20,7 +20,7 @@ func Message(userId int64, message string) {
"peer_id=" + strconv.FormatInt(userId, 10),
"message=" + url.QueryEscape(message),
"v=5.95",
"random_id=" + strconv.FormatInt(int64(randomId), 10),
"random_id=" + strconv.FormatInt(randomId, 10),
}
paramString := strings.Join(params, "&")
resp, err := http.Get(SendMessageUrl + "?" + paramString)