This was my solution, for logging into a particular website and retrieving a file. I was getting redirected multiple times before reaching the destination. I test HTTP .