Skip to content

Commit 336b1fb

Browse files
authored
Support requests_session param in webpush fn too (#133)
* support requests_session param in webpush fn too * format for line length * move new requests_session argument to the end of the arg list
1 parent 05f90f1 commit 336b1fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pywebpush/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ def webpush(subscription_info,
383383
timeout=None,
384384
ttl=0,
385385
verbose=False,
386-
headers=None):
386+
headers=None,
387+
requests_session=None):
387388
"""
388389
One call solution to endcode and send `data` to the endpoint
389390
contained in `subscription_info` using optional VAPID auth headers.
@@ -473,7 +474,9 @@ def webpush(subscription_info,
473474
print("\t headers: {}".format(vapid_headers))
474475
headers.update(vapid_headers)
475476

476-
response = WebPusher(subscription_info, verbose=verbose).send(
477+
response = WebPusher(
478+
subscription_info, requests_session=requests_session, verbose=verbose
479+
).send(
477480
data,
478481
headers,
479482
ttl=ttl,

0 commit comments

Comments
 (0)