🐛 默认请求方式

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

No files matched your search

+4 -7
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 {