[英]How can I disable automatically following redirects using python's httplib2?
I would like to disable httplib2 from following redirects when I make a GET request to some site. 当我向某个站点发出GET请求时,我想禁止httplib2跟随重定向。 Is this possible?
这可能吗?
Disable redirects on your Http
object: 在您的
Http
对象上禁用重定向:
import httplib2
http = httplib2.Http()
http.follow_redirects = False
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.