mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +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
|
package notif
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -45,3 +46,11 @@ func (base *ProviderBase) GetURL() string {
|
||||||
func (base *ProviderBase) GetToken() string {
|
func (base *ProviderBase) GetToken() string {
|
||||||
return base.Token
|
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
|
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.
|
// MakeBody implements Provider.
|
||||||
func (client *GotifyClient) MakeBody(logMsg *LogMessage) (io.Reader, error) {
|
func (client *GotifyClient) MakeBody(logMsg *LogMessage) (io.Reader, error) {
|
||||||
var priority int
|
var priority int
|
||||||
|
|
Loading…
Add table
Reference in a new issue