File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate:
4848
4949 .. attribute :: headers
5050
51- The HTTP response headers for the HTTP request that cause the
51+ The HTTP response headers for the HTTP request that caused the
5252 :exc: `HTTPError `.
5353
5454 .. versionadded :: 3.4
Original file line number Diff line number Diff line change @@ -1627,6 +1627,11 @@ headers from a :class:`~urllib.request.Request`. (Contributed by Alexey
16271627Kachayev in :issue: `16464 `, Daniel Wozniak in :issue: `17485 `, and Damien Brecht
16281628and Senthil Kumaran in :issue: `17272 `.)
16291629
1630+ :class: `~urllib.error.HTTPError ` objects now have a
1631+ :attr: `~urllib.error.HTTPError.headers ` attribute that provides access to the
1632+ HTTP response headers associated with the error. (Contributed by
1633+ Berker Peksag in :issue: `15701 `.)
1634+
16301635
16311636unittest
16321637--------
You can’t perform that action at this time.
0 commit comments