Added error handling if SCG returns non-200 HTTP status code
This commit is contained in:
parent
d422f63f9c
commit
33ba48c968
3 changed files with 26 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue