python-http_request 0.1.6.2__tar.gz → 0.1.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/PKG-INFO +1 -1
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/extension/request.py +5 -4
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/pyproject.toml +1 -1
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/LICENSE +0 -0
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/__init__.py +0 -0
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/extension/__init__.py +0 -0
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/py.typed +0 -0
- {python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/readme.md +0 -0
{python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/extension/request.py
RENAMED
|
@@ -150,8 +150,6 @@ def urlopen(
|
|
|
150
150
|
headers=None,
|
|
151
151
|
**request_kwargs,
|
|
152
152
|
) -> HTTPResponse:
|
|
153
|
-
if headers is None:
|
|
154
|
-
headers = {}
|
|
155
153
|
urlp = urlsplit(url)
|
|
156
154
|
if urlp.scheme == "https":
|
|
157
155
|
con: HTTPConnection = HTTPSConnection(urlp.netloc)
|
|
@@ -161,10 +159,13 @@ def urlopen(
|
|
|
161
159
|
method,
|
|
162
160
|
urlunsplit(urlp._replace(scheme="", netloc="")),
|
|
163
161
|
data,
|
|
164
|
-
headers,
|
|
162
|
+
{} if headers is None else headers,
|
|
165
163
|
)
|
|
166
164
|
socket_keepalive(con.sock)
|
|
167
|
-
|
|
165
|
+
resp = con.getresponse()
|
|
166
|
+
setattr(resp, "method", method.upper())
|
|
167
|
+
setattr(resp, "url", url)
|
|
168
|
+
return resp
|
|
168
169
|
|
|
169
170
|
|
|
170
171
|
urlopen_async = lambda *a, **k: to_thread(urlopen, *a, **k)
|
|
File without changes
|
|
File without changes
|
{python_http_request-0.1.6.2 → python_http_request-0.1.6.3}/http_request/extension/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|