Getting error: 'pmlib' is not defined #3373
Unanswered
mahfuz-khan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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