mirror of
https://github.com/caronc/apprise.git
synced 2024-11-25 01:24:03 +01:00
Signal supports a HTTP 201 Response (#592)
This commit is contained in:
parent
3ffac7c372
commit
6ac9c1d89a
@ -320,7 +320,8 @@ class NotifySignalAPI(NotifyBase):
|
||||
verify=self.verify_certificate,
|
||||
timeout=self.request_timeout,
|
||||
)
|
||||
if r.status_code != requests.codes.ok:
|
||||
if r.status_code not in (
|
||||
requests.codes.ok, requests.codes.created):
|
||||
# We had a problem
|
||||
status_str = \
|
||||
NotifySignalAPI.http_response_code_lookup(
|
||||
|
@ -112,6 +112,11 @@ apprise_url_tests = (
|
||||
# use get args to acomplish the same thing (use source instead of from)
|
||||
'instance': plugins.NotifySignalAPI,
|
||||
}),
|
||||
('signals://user:password@localhost/{}/{}'.format('1' * 11, '3' * 11), {
|
||||
'instance': plugins.NotifySignalAPI,
|
||||
# Test that a 201 response code is still accepted
|
||||
'requests_response_code': 201,
|
||||
}),
|
||||
('signals://localhost/{}/{}/{}?batch=True'.format(
|
||||
'1' * 11, '3' * 11, '4' * 11), {
|
||||
# test batch mode
|
||||
|
Loading…
Reference in New Issue
Block a user