Category Archives: Postman

[Postman] Upload file to s3 in pre-request script

First, select binary in the body settings, and assign a file at will. Then the real file path will be obtained through the syntax in pre-script. In some cases, you may need to set the file directory to Postman’s working … Continue reading

Posted in Postman | Comments Off on [Postman] Upload file to s3 in pre-request script

AES decrypt in postman

sample code: var CryptoJS = require(“crypto-js”); let secretKey = ‘yourSecretKey’; function decrypt(aesStr, key) { return CryptoJS.AES.decrypt( aesStr, CryptoJS.enc.Utf8.parse(padding(key)), { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 } ).toString(CryptoJS.enc.Utf8) } function padding(key) { return key.padEnd(32, ‘\0’); } //decrypt(“encryptedData”, secretKey) Here we choose AES-256 to … Continue reading

Posted in JavaScript, Postman | Comments Off on AES decrypt in postman