Highlighted
Trusted Contributor.
Trusted Contributor.
916 views

web_set_user with parameters

Jump to solution

I need your help here with this function.

When I hardcode the arguments, like:

web_set_user ("John", "thisismypassword", "yyy.com:80")

The script runs fine and executes all the transactions. No problem at all.

But, when I try to use a parameter for the argument user, LR gives me an error:  401 for Unauthorized...

I tried:

web_set_user ("{User}", "thisismypassword", "xxx.com:80")

I exposed to the console the content of the parameter user and it looks fine: John

I really don't know what's going on.

What's the correct syntax for this function in order to use it with parameters?

 

Thanks.

0 Likes
1 Solution

Accepted Solutions
Respected Contributor.
Respected Contributor.

Hi,

Sorry the the delayed response.

You can use parameter in API like below:

web_set_user (lr_eval_string("{User}"), "thisismypassword", "xxx.com:80")

View solution in original post

0 Likes
1 Reply
Respected Contributor.
Respected Contributor.

Hi,

Sorry the the delayed response.

You can use parameter in API like below:

web_set_user (lr_eval_string("{User}"), "thisismypassword", "xxx.com:80")

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.