feedpushr
feedpushr copied to clipboard
How to configure webhooks with Gotify ?
- Target URL: https://push.xxx.com/message?token=XXXXXIEEO7hrhQ
- Content Type: JSON
- Payload:
{
"title": "[feedpushr]",
"message": "{{.Content}}",
"priority": 8
}
It didn't work !
Did the content contain quotation marks? If so, you need to escape them by using the escapes functions such as {{ .Content | html }} or {{ .Content | js }} or {{ .Content | urlquery }} (see: https://pkg.go.dev/text/template#hdr-Functions)
A better option in this case would be to filter .Content with {{.Content | printf "%q"}} as this will produce a quoted string with all encapsulated quotes properly escaped.