Is there a way to add headers to a browser widget?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi, is there anyway to add request headers to a browser widget?

Please see screenshot for sample header to be included.

Hi ,

You can try the below code syntax to pass the headers to the browser

var headersData = {"Authorization" : "Header1234"};

frmBrowser.brwTest.requestURLConfig = {

URL: "https://xxxxxxx/xxx/",

requestMethod:constants.BROWSER_REQUEST_METHOD_GET,

headers: headersData

};

frmBrowser.show();

Hi,

Will this be appended at the end of the url? Because we do not want that to happen.

Regards,

I know this was asked a long time ago, but I just saw it and will answer for posterity.

Only GET parameters are appended and visible at the end of the requested URL, but this only happens in a proper stand-alone browser. Request headers are not visible in any browser unless you use the browser's developer tools.

Also, even if you did use GET parameters, the browser widget —which is not a stand-alone browser— does not show the requested URL and query at all.

Hi ,

You can set httpHeaders only at the service level(not at widget level).

Please go through the below documentation.

http://docs.kony.com/konylibrary/visualizer/viz_api_dev_guide/content/httprequestobject.htm