Getting error: 'pmlib' is not defined #3373
Unanswered
mahfuz-khan
asked this question in
Q&A
Replies: 1 comment
-
|
been a minute so you've prob solved this but for anyone else: this line create a global variable called pmlib_code and copy paste the code at this link into the value |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After migrating a collection from Postman to Bruno, I tried to execute Token, but facing the following error.
"Error invoking remote method 'send-http-request': ,Error: 'pmlib' is not defined".
For your additional information:
Once after migration from Postman, I saw that some commands were not translated.
In the Script section:
// eval(pm.globals.get('pmlib_code'));
let CLIENT_ASSERTION = pmlib.jwtSign(jwk = PRIVATE_KEY, payload, header);
// postman.setGlobalVariable("CLIENT_ASSERTION", CLIENT_ASSERTION);
In the Tests section
let jsonData = JSON.parse(responseBody);
// postman.setGlobalVariable('JWT', jsonData.access_token);
// postman.setGlobalVariable('CustomerAccountId', '12345678');
// postman.setGlobalVariable('API_ENDPOINT_URL', 'https://example.coml:8101');
test("Response time is less than 200ms", function () {
expect(res.getResponseTime()).to.be.below(200);
});
What is the code for Bruno that I can use?
Please help.
Beta Was this translation helpful? Give feedback.
All reactions