push-notifications-python icon indicating copy to clipboard operation
push-notifications-python copied to clipboard

Share session between requests

Open allburov opened this issue 1 year ago • 0 comments
trafficstars

Hi! It's fine (and better) to share the session instance between requests.

https://requests.readthedocs.io/en/latest/user/advanced/

So if you’re making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase (see HTTP persistent connection).

Another benefit - we get access to beams.session and we can configure it as we want to (our case it to add logging for the pusher beams client http requests\responses)

allburov avatar Jan 29 '24 05:01 allburov