Revision 13857
Added by Aaron Marcuse-Kubitza over 10 years ago
tnrs.py | ||
---|---|---|
149 | 149 |
headers = initial_headers.copy() # don't modify global constant! |
150 | 150 |
|
151 | 151 |
def do_request(request): |
152 |
debug_log('request', str(request)) |
|
153 |
response = urllib2.urlopen(urllib2.Request(url, request, headers)) |
|
152 |
request_obj = urllib2.Request(url, request, headers) |
|
153 |
debug_log('request info', str(request_obj.header_items())) |
|
154 |
debug_log('request str', str(request_obj.get_data())) |
|
155 |
response = urllib2.urlopen(request_obj) |
|
154 | 156 |
response_str = streams.read_all(response) |
155 | 157 |
response_info = str(response.info()) |
156 | 158 |
debug_log('response info', response_info) |
Also available in: Unified diff
lib/tnrs.py: do_request(): also debug-print request headers