15
Views
1
Comments
Solved
How to loop header to set BaseURL from inputbox in onbeforerequest

Hi,

I added InputVariable in Header to the REST API Method and in onBeforeRequest I Iterate the Header Table. There are several other item pairs in the header. As well as my BaseURL. I need to set the BaseURL to the CustomizeRequest-Base URL. But how do I get the BaseURL?

Do I need to add an <if> somewhere and where?

What do I need to put here for the BaseURL?

Situation as below does not work.



Solution

Solved myself.

I ended up adding a Site.Authorization variable to hold the BearerToken and a Site.BaseURL variable. 

In the OnBeforeRequest set the request.baseURL as this URL.

No need for a loop anymore.

Have a good day.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.