File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ Changelog
33
44Here you find a full list of changes.
55
6+ Version 2.0.1
7+ -------------
8+
9+ - Reuse HTTP connections between requests
10+
611Version 2.0.0
712-------------
813
Original file line number Diff line number Diff line change 33except ImportError :
44 from distutils .core import setup
55
6- VERSION = '2.0.0 '
6+ VERSION = '2.0.1 '
77
88setup (
99 name = 'usabilla-api' ,
Original file line number Diff line number Diff line change @@ -127,6 +127,8 @@ class APIClient(object):
127127 host = 'data.usabilla.com'
128128 host_protocol = 'https://'
129129
130+ session = requests .Session ()
131+
130132 def __init__ (self , client_key , secret_key ):
131133 """Initialize an APIClient object."""
132134 self .query_parameters = ''
@@ -237,7 +239,7 @@ def send_signed_request(self, scope):
237239
238240 # Send the request.
239241 request_url = self .host + scope + '?' + canonical_querystring
240- r = requests .get (self .host_protocol + request_url , headers = headers )
242+ r = self . session .get (self .host_protocol + request_url , headers = headers )
241243 r .raise_for_status ()
242244
243245 return r .json ()
You can’t perform that action at this time.
0 commit comments