mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
make POST and JSON as notification defaults
This commit is contained in:
parent
357897a0cd
commit
6ae391a3c9
2 changed files with 9 additions and 10 deletions
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue