Skip to content

Commit 4e8c029

Browse files
committed
add a headers property
1 parent f022983 commit 4e8c029

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mechanize/_response.py

+12
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ def __copy__(self):
289289
def info(self):
290290
return self._headers
291291

292+
@property
293+
def headers(self):
294+
return self._headers
295+
292296
def geturl(self):
293297
return self.wrapped.geturl()
294298

@@ -334,6 +338,10 @@ def geturl(self):
334338
def info(self):
335339
return self._headers
336340

341+
@property
342+
def headers(self):
343+
return self._headers
344+
337345

338346
class closeable_response:
339347
"""Avoids unnecessarily clobbering urllib.addinfourl methods on .close().
@@ -392,6 +400,10 @@ def __repr__(self):
392400
def info(self):
393401
return self._headers
394402

403+
@property
404+
def headers(self):
405+
return self._headers
406+
395407
def getcode(self):
396408
return self.code
397409

0 commit comments

Comments
 (0)