mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Patch #800236: add HTTPResponse.getheaders().
This commit is contained in:
parent
c473c99d16
commit
deacce2c87
3 changed files with 12 additions and 0 deletions
|
@ -493,6 +493,12 @@ class HTTPResponse:
|
|||
raise ResponseNotReady()
|
||||
return self.msg.getheader(name, default)
|
||||
|
||||
def getheaders(self):
|
||||
"""Return list of (header, value) tuples."""
|
||||
if self.msg is None:
|
||||
raise ResponseNotReady()
|
||||
return self.msg.items()
|
||||
|
||||
|
||||
class HTTPConnection:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue