How does one programmatically set selections under the Authorization tab? Here’s the scenario:
Request A1(of a collection) requires Authorization->NTLM. Request B(of a different collection) requires Authorization->Bearer Token.
Looking for a programmatic way to auto configure either NTLM or Bearer Token based on a specified env variable or another method. The idea is to toggle selection under Authorization tab programmatically.
Will using “authorizeUsing(type)” or upsertHeader() call change selection under Authorization tab display – for example: current Authorization is “NTLM…” and if use method call to “Basic” will Authorization tab entry show “Basic”. In my experiment using
var sToken = "Bearer " + pm.globals.get(“GatewayToken”);
pm.test("sToken is: " + sToken);
pm.request.upsertHeader({“Authorization”: sToken});
the Authorization tab entry did not change to “Bearer token” .