2

How to do basic authentication for the request in web load performance tool?

enter image description here

2 Answers2

1

You are doing the right thing, but need to change the order - move the Password and username settings above the wlHttp.Post command.

yshalbar
  • 1,455
  • 1
  • 9
  • 23
1

Add before calling the post command

//StartAuthentication
wlHttp.OverrideAuthorizationHeader = true;
wlHttp.Header["Authorization"] = "Basic XXXXXX";
//EndAuthentication
Ravindra
  • 210
  • 3
  • 13
  • This will work too but you'll need to manually generate the authorization data (user name : password as Base64), normally you would only use that option for custom authentication, like 'Bearer' authentication. For basic authentication specifying username/password is simpler. – yshalbar Jan 27 '21 at 22:41