Answer the question
In order to leave comments, you need to log in
Can't send a POST request correctly?
Using this code, I'm trying to send a post request, which theoretically should return xml or json, but as a result it returns stupidly the page to which I connected
Connection.Response connection = Jsoup.connect("http://readmanga.me")
.userAgent(UserAgent)
.ignoreContentType(true)
.header("Content-Encoding", "gzip")
.header("Content-Language", "ru")
.header("Content-Type","text/html;charset=UTF-8")
.cookie("_ga", "GA1.2.2085812534.1461172815")
.cookie("_gat","1")
.cookie("_ym_isad","1")
.cookie("ym_uid","1460995028545940403")
.cookie("JSESSIONID","B73F1587B25CB4271E54792BE3347FBB")
.cookie("skin","sk6")
.cookie("sso_timeout","1")
.data("q", "online")
.referrer("http://readmanga.me/search")
.method(Connection.Method.POST)
.execute();
doc = connection.parse();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question