1

I am trying to set authentication parameters in httpUnit. The URL that I want to access can only be accessed when authentication parameters are set otherwise it returns

Internal server error 500

But its not working when I tried to set parameters

The code I am using to set authentication using httpUnit is given below

WebConversation wc = new WebConversation();

WebRequest request2 = new PostMethodWebRequest("");   //url comes here

wc.setAuthentication("UserDatabaseRealm", "username", "password");

I am getting internal server error 500 as it is not accepting the authentication credentials.

It would be really greatful if someone could help me out in this. Thank you

Nafeez Quraishi
  • 5,380
  • 2
  • 27
  • 34
harsha10
  • 13
  • 3

0 Answers0