Informational post: Set data to Browser widget dynamically through code

Hello All,

Understanding how to use ‘requestURLConfig’ property of Browser widget, to set a URL to be rendered in the Browser widget dynamically through code.

Here is a sample code snippet:

this.view.browser.requestURLConfig={
  "URL":"https://academy.hcltechsw.com/",
  "requestMethod":constants.BROWSER_REQUEST_METHOD_GET,
  "requestData":[["saddr","chicago"],["daddr","memphis"]]
};
  1. URL: this is the first parameter in the JSON object, this parameter contains the URL that you want to render in the Browser widget
  2. requestMethod: This is the second parameter in the JSON object, this parameter is optional, default value is constants.BROWSER_REQUEST_METHOD_GET
  3. requestData: This is the third parameter in the JSON object, this parameter is optional, the value of this parameter is an array of arrays, each sub-array represents a request parameter and its value

Thanks and Regards,
Venkata Raju Bankapalli