使用urllib2将数据添加到HTTP GET请求

时间:2014-07-23 13:03:01

标签: python http python-2.7 urllib2

例如,如果我向谷歌发送请求,它在fiddler中看起来像这样:

GET http://www.google.com HTTP/1.1
Accept-Encoding: identity
Host: google.com
Connection: close
User-Agent: Python-urllib/2.7

我希望看起来像这样:

GET http://www.google.com HTTP/1.1
Accept-Encoding: identity
Host: google.com
Connection: close
User-Agent: Python-urllib/2.7

a=112&b=2335

我怎样才能使用urllib2 / 1? 谢谢!

0 个答案:

没有答案