You can use TypeScript to enhance logic and functionality in the logic blocks of your Postman Flows. For example, with TypeScript you can write expressions that evaluate data informing your Flow's decisions, and functions that process data within your Flow.
The logic blocks in Postman Flows (If and Evaluate) support both Flows Query Language (FQL) and TypeScript. While FQL is designed for querying and transforming data, TypeScript offers the robustness and flexibility of a full programming language within your Postman Flows. This makes TypeScript more suitable for complex logic and large-scale projects. Also, if you are familiar with both the JavaScript and TypeScript ecosystems, you may prefer using TypeScript over FQL.
Scripts written with TypeScript in Postman Flows have the following restrictions:
fetch
isn't available).TypeScript in Postman Flows provides a range of cryptographic capabilities including the Web Crypto API, SHA-256 hashing, AES encryption, and secure random number generation, among others.
You can use TypeScript to send console logs to the Postman Console using the following methods:
To use TypeScript in an Evaluate or If block, select TypeScript from the dropdown list and enter your code in the block. Evaluate and If blocks use FQL by default.
Last modified: 2024/04/29