make POST and JSON as notification defaults

This commit is contained in:
yusing 2025-01-31 14:56:55 +08:00
parent 357897a0cd
commit 6ae391a3c9
2 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,7 @@
package notif
import (
"net/http"
"net/url"
"strings"
@ -45,3 +46,11 @@ func (base *ProviderBase) GetURL() string {
func (base *ProviderBase) GetToken() string {
return base.Token
}
func (base *ProviderBase) GetMethod() string {
return http.MethodPost
}
func (base *ProviderBase) GetMIMEType() string {
return "application/json"
}

View file

@ -24,16 +24,6 @@ func (client *GotifyClient) GetURL() string {
return client.URL + gotifyMsgEndpoint
}
// GetMethod implements Provider.
func (client *GotifyClient) GetMethod() string {
return http.MethodPost
}
// GetMIMEType implements Provider.
func (client *GotifyClient) GetMIMEType() string {
return "application/json"
}
// MakeBody implements Provider.
func (client *GotifyClient) MakeBody(logMsg *LogMessage) (io.Reader, error) {
var priority int