followRedirects()to enable the following redirects:
HttpRequestrepresents just a single request; clean and simple.
HttpBrowseremulates browsing of a website (i.e. set of URLs) like a browser. Besides sending requests, it also stores and resends cookies, maintaining the current user session. Moreover, the
HttpBrowseruses new request on redirection following, allows common request headers for all the requests etc.
-Dhttps.protocols=TLSv1.1,TLSv1.2which configures the JVM to specify which TLS protocol version should be used during HTTPS connections.