@@ -26,7 +26,7 @@ class HTTPConnection(object):
26
26
``'http2bin.org'``, ``'http2bin.org:443'`` or ``'127.0.0.1'``.
27
27
:param port: (optional) The port to connect to. If not provided and one also
28
28
isn't provided in the ``host`` parameter, defaults to 443.
29
- :param secure: (optional) Whether the request should use TLS.
29
+ :param secure: (optional) Whether the request should use TLS.
30
30
Defaults to ``False`` for most requests, but to ``True`` for any
31
31
request issued to port 443.
32
32
:param window_manager: (optional) The class to use to manage flow control
@@ -116,18 +116,18 @@ def request(self, method, url, body=None, headers={}):
116
116
method = method , url = url , body = body , headers = headers
117
117
)
118
118
119
- def get_response (self ):
119
+ def get_response (self , * args , ** kwargs ):
120
120
"""
121
121
Returns a response object.
122
122
"""
123
123
try :
124
- return self ._conn .get_response ()
124
+ return self ._conn .get_response (* args , ** kwargs )
125
125
except HTTPUpgrade as e :
126
- # We upgraded via the HTTP Upgrade mechanism. We can just
127
- # go straight to the world of HTTP/2. Replace the backing object
126
+ # We upgraded via the HTTP Upgrade mechanism. We can just
127
+ # go straight to the world of HTTP/2. Replace the backing object
128
128
# and insert the socket into it.
129
129
assert e .negotiated == H2C_PROTOCOL
130
-
130
+
131
131
self ._conn = HTTP20Connection (
132
132
self ._host , self ._port , ** self ._h2_kwargs
133
133
)
@@ -139,7 +139,7 @@ def get_response(self):
139
139
140
140
# HTTP/2 preamble must be sent after receipt of a HTTP/1.1 101
141
141
self ._conn ._send_preamble ()
142
-
142
+
143
143
return self ._conn .get_response (1 )
144
144
145
145
# The following two methods are the implementation of the context manager
0 commit comments