Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..
316 views

Web HTTP-HTML: parametrization with web_reg_save_param()

Hi all, 

I must to capture dynamic values from this request:

param.png

So I've insered the function below in the script,

web_reg_save_param_ex(
                "ParamName=model_id",
                "LB=\"modelIds\":[\"",
                "RB=\"]",
                SEARCH_FILTERS,
                "Scope=Body",
                "RequestUrl=" 
                "https://pbisys.syssede.systest.sanpaoloimi.com/powerbi/api/explore/reports/*",
        LAST);

but when I execute the bytecode the error log sends

 Error -35061: No match found for the requested parameter "model_id". Either the specified boundaries were not found in the response or the matched text is longer than current max html parameter size of 256 bytes

I suppose there's something wrong with the function syntax. Can anyone help me with this problem?

Thanks a lot for the support!
Lorenzo

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Web HTTP-HTML: parametrization with web_reg_save_param()

HI Lorenzo, I see three potential issues.

Normally a request is send by you and you use web_reg_save_param() to find data in the response. The response is the unkown. The request is the known part so no need to use web_reg_save_param(). (Note that you should use web_reg_save_param_ex() or one of the other web_reg_save_param_*() functions.).

The small letter L looks alike the capital I in the word 'modelIds'. Validate this, it might be a typo.

It look like that the format of your Request conains a newline before and after "792..977", but you do not have that in your expression of LB and RB. Note that the new-lines might also be an formatting issue of VuGen itself (check the raw data). To solve that you might add a new line character at the right place.

Success, Erik

Signature:
Reward community members who take time to respond and help.
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Web HTTP-HTML: parametrization with web_reg_save_param()

Thanks a lot for the gentle response. The fact is that information ("modelIds") is unknown, so I've the idea to made a parameter to capture all possible values of it, but you're right: the parametrization is still possible on the response. 

I will try another solution. 

Thanks again!

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.