🐛 默认请求方式

This commit is contained in:
naiba
2021-11-05 14:53:27 +08:00
parent b4410e7cd7
commit 96c25f6fba
3 changed files with 6 additions and 9 deletions

View File

@@ -42,17 +42,14 @@ func (n *Notification) reqURL(message string) string {
}
func (n *Notification) reqMethod() string {
switch n.RequestMethod {
case NotificationRequestMethodGET:
return http.MethodGet
case NotificationRequestMethodPOST:
return http.MethodGet
if n.RequestMethod == NotificationRequestMethodPOST {
return http.MethodPost
}
return ""
return http.MethodGet
}
func (n *Notification) reqBody(message string) (string, error) {
if n.RequestMethod == NotificationRequestMethodGET {
if n.RequestMethod == NotificationRequestMethodGET || message == "" {
return "", nil
}
switch n.RequestType {