79635226

Date: 2025-05-23 09:29:38
Score: 2
Natty:
Report link
### Make the Bearer token available
< {%
    const token = execSync('cat /path/to/token.jwt', { encoding: 'utf8' }).trim();
    client.global.set('auth_token', token);
    client.log("token: " + client.global.get('auth_token'));
%}

GET https://my.server/api/info
Authorization: Bearer {{auth_token}}

see https://www.jetbrains.com/help/idea/javascript-api-supported-by-http-client.html#exec-methods

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ewknmf