equal
deleted
inserted
replaced
3199 req = urlmod.urlreq.request(pycompat.strurl(url), body, headers) |
3199 req = urlmod.urlreq.request(pycompat.strurl(url), body, headers) |
3200 |
3200 |
3201 # urllib.Request insists on using has_data() as a proxy for |
3201 # urllib.Request insists on using has_data() as a proxy for |
3202 # determining the request method. Override that to use our |
3202 # determining the request method. Override that to use our |
3203 # explicitly requested method. |
3203 # explicitly requested method. |
3204 req.get_method = lambda: method |
3204 req.get_method = lambda: pycompat.sysstr(method) |
3205 |
3205 |
3206 try: |
3206 try: |
3207 res = opener.open(req) |
3207 res = opener.open(req) |
3208 body = res.read() |
3208 body = res.read() |
3209 except util.urlerr.urlerror as e: |
3209 except util.urlerr.urlerror as e: |