Skip to main content

Other Examples

Send API request

pm.sendRequest("", function(err, response) {

View more details for pm.sendRequest here.


Decode base64 Data

var cryptoJs = require("crypto-js");

// base64Content is a value that has been encoded with base64.
var rawContent = base64Content.slice(

// CryptoJS is an object that is embedded in the scripting engine.
// You can use it directly. View documentation here:
var intermediate = cryptoJs.enc.Base64.parse(base64content);
pm.test("Contents are valid", function() {
pm.expect(cryptoJs.enc.Utf8.stringify(intermediate)); // a check for non-emptiness

You can use the built-in JS library to implement encryption and decryption algorithms.

Convert XML to JSON

var jsonObject = xml2Json(responseBody);