Created
November 27, 2013 17:09
-
-
Save akeinhell/7679355 to your computer and use it in GitHub Desktop.
sample JSoup XMLHttpRequest with cookies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document doc = Jsoup.connect(jurl) | |
.header("Accept","text/html, */*; q=0.01") | |
.header("Accept-Encoding","gzip,deflate,sdch") | |
.header("Accept-Language","ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4") | |
.header("Connection","keep-alive") | |
.header("Cookie",cookie) | |
.header("Host","rivalregions.com") | |
.header("Referer","http://rivalregions.com/") | |
.header("User-Agent","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36") | |
.header("X-Requested-With", "XMLHttpRequest") | |
//.cookie(genUrl(),cookie) | |
.get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment