Issue 15090: Add etag support to urllib.request.urlopen (original) (raw)

Issue15090

Created on 2012-06-17 07:02 by rhettinger, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg163021 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012-06-17 07:02
Add an optional argument to urlretrieve to specify an etag for previously downloaded content: >>> urlretrieve('example.com/data.txt', etag="105800d-4af6-4c29d893d69c0") That optional argument would add the following to the outgoing headers: "If-None-Match: 105800d-4af6-4c29d893d69c0" If the site returns a 304 Not Modified, then the full content download isn't needed.
msg163052 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-17 10:31
urlretrieve() is the old urllib interface. You probably want to improve the urllib2-inherited urlopen() instead.
History
Date User Action Args
2022-04-11 14:57:31 admin set github: 59295
2012-06-24 19:31:52 eric.araujo set nosy: + eric.araujotitle: Add etag support to urllib.request.urlretrieve() -> Add etag support to urllib.request.urlopenstage: needs patchversions: + Python 3.4, - Python 3.3
2012-06-17 14:31:27 jcea set nosy: + jcea
2012-06-17 10:31:25 pitrou set nosy: + orsenthil, pitroumessages: + versions: + Python 3.3, - Python 3.4
2012-06-17 08:16:18 serhiy.storchaka set nosy: + serhiy.storchaka
2012-06-17 07:02:36 rhettinger create