I am trying to submit a form in a website using java. I know a little about the HttpUrlConnection class and have used it to submit forms in websites that does not require authentication. But, now I want to submit a form inside a website that requires authentication.
I have googled a little and found that the HttpUrlConnection supports this with two types of authentication, namely basic and digest. The problem is I do not know which type of authentication my target website uses. I know that it uses Ldap for authentication. Could someone please provide some kind of sample code with which to submit a form in a website that requires authentication.
Thanks in advance.