J
J
Jsman2016-01-26 17:42:09
Java
Jsman, 2016-01-26 17:42:09

How to log in to your personal account?

Good afternoon! The situation is as follows: you need to go to your personal account and parse headers from there, but I ran into an incomprehensibility how to enter your personal account. I found a finished piece when I used it, but alas, a 401 error.
Tell me where the error is and how to fix it?

Document doc = Jsoup.connect(URL)
                .data("login",   "xxxxx")
                .data("passwd",  "xxxxx")
                .data("retpath", "url")
                .post();

Catch Exception with error 401 - authorization fails
Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=401, URL=

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Malyarov, 2016-01-26
@Konstantin18ko

How about encoding? Can change?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question