mirror of
https://github.com/caronc/apprise.git
synced 2025-01-19 04:19:32 +01:00
Use Gotify X-Gotify-Key Header vs params token (#558)
This commit is contained in:
parent
4cc5be0d6d
commit
fc60dcdd0d
@ -170,11 +170,6 @@ class NotifyGotify(NotifyBase):
|
|||||||
# Append our remaining path
|
# Append our remaining path
|
||||||
url += '{fullpath}message'.format(fullpath=self.fullpath)
|
url += '{fullpath}message'.format(fullpath=self.fullpath)
|
||||||
|
|
||||||
# Define our parameteers
|
|
||||||
params = {
|
|
||||||
'token': self.token,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare Gotify Object
|
# Prepare Gotify Object
|
||||||
payload = {
|
payload = {
|
||||||
'priority': self.priority,
|
'priority': self.priority,
|
||||||
@ -193,6 +188,7 @@ class NotifyGotify(NotifyBase):
|
|||||||
headers = {
|
headers = {
|
||||||
'User-Agent': self.app_id,
|
'User-Agent': self.app_id,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
'X-Gotify-Key': self.token,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.logger.debug('Gotify POST URL: %s (cert_verify=%r)' % (
|
self.logger.debug('Gotify POST URL: %s (cert_verify=%r)' % (
|
||||||
@ -206,7 +202,6 @@ class NotifyGotify(NotifyBase):
|
|||||||
try:
|
try:
|
||||||
r = requests.post(
|
r = requests.post(
|
||||||
url,
|
url,
|
||||||
params=params,
|
|
||||||
data=dumps(payload),
|
data=dumps(payload),
|
||||||
headers=headers,
|
headers=headers,
|
||||||
verify=self.verify_certificate,
|
verify=self.verify_certificate,
|
||||||
|
Loading…
Reference in New Issue
Block a user