net.readUrlUnicode can take data, headers too

This commit is contained in:
j 2011-04-26 23:11:24 +02:00
parent cbca12c3d8
commit c66787785f

View file

@ -60,8 +60,8 @@ def readUrl(url, data=None, headers=DEFAULT_HEADERS, returnHeaders=False):
return dict(f.headers), data return dict(f.headers), data
return data return data
def readUrlUnicode(url): def readUrlUnicode(url, data=None, headers=DEFAULT_HEADERS):
data = readUrl(url) data = readUrl(url, data, headers)
encoding = getEncoding(data) encoding = getEncoding(data)
if not encoding: if not encoding:
encoding = 'latin-1' encoding = 'latin-1'