0

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.

1 Answer 1

1

Whatever method of authentication your target website uses is not a concern for you, until you know how does the website authenticates your client. If it just accepts a username and password while making a request then just send it that way.

This is the reason why most of the famous target websites have API's provided.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.