-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch foxglove client to using Requests.Session (#108)
Switch from using raw `requests` methods to using a `requests.Session` object, which automatically uses keep-alive connections and connection pooling (as per https://docs.python-requests.org/en/latest/user/advanced/). This makes the client faster when making multiple API calls in succession, because it doesn't need to re-negotiate a TCP connection for each call. The session object can also hold the headers and use them for every request. Tested with unit tests and `examples/downloading_data.py`
- Loading branch information
Showing
2 changed files
with
36 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters