How can I disable automatically following redirects using python's httplib2?

1.2k views Asked by At

I would like to disable httplib2 from following redirects when I make a GET request to some site. Is this possible?

1

There are 1 answers

0
Thomas Orozco On BEST ANSWER

Disable redirects on your Http object:

import httplib2

http = httplib2.Http()
http.follow_redirects = False