The Postman VS Code extension enables you to create and sendHTTP andmulti-protocol requests, or yourrequest history. Use the Postman Console in the VS Code extension todebug and troubleshoot issues with your requests. It also supportscreating code snippets from your API requests for various languages, such as Node.js or cURL. You can also usecookies with the VS Code extension.
Requests sent in the Postman VS Code extension appear in your workspace’s request history in both the VS Code extension and the Postman app.
To create and send an HTTP request, do the following:
Select a workspace from the workspace dropdown list in the sidebar.
Click in the request dropdown list in the sidebar, then selectHTTP to use Postman’s REST client.

If you selectedHTTP from the request dropdown list, you can create another HTTP request by clickingNew HTTP Request in the sidebar.
Enter your request’s details.
ClickSend.
To learn more about creating and sending HTTP requests in Postman, seeSend API requests and get response data in Postman.
You can also use the
Postman: Create a new HTTP Requestcommand from theCommand Palette to create a request.
When you create a request, click in the request dropdown list. Then, selectWebSocket orgRPC to create a WebSocket or gRPC client.
To create a WebSocket request, do the following:
ws:// orwss://.To learn more about creating and sending WebSocket requests in Postman, seeCreate a WebSocket Request.
To create a gRPC request, do the following:
To learn more about creating and sending gRPC requests in Postman, seeInvoke a gRPC request in Postman.
You can send requests that were sent with the Postman VS Code extension or the Postman app.
You can store and reuse variables in the VS Code extension. Each collection, environment, and global variable has aninitial value and a current value you can define for different uses. You canset a global or environment variable as secret type, masking the initial and current values. You can also learn more aboutsharing variable values with your team.
The steps for defining and sharing variable values are different in the Postman app. Learn aboutvariable values in the Postman app.
Define the current value for a variable to use it locally with your requests. You can define the initial value for a variable to share it with your team and use it with Postman features that run on the cloud. Make sure you understand the differences between current and initial values before adding your own data.
Initial value - The initial value is synced to the Postman cloud and shared with your team. The initial value is also used when sending requests from scheduled collection runs, monitors, the Postman CLI, and Newman. Learn more aboutsharing variable values in the VS Code extension.
Current value - The current value is only available locally in your instance of Postman and used to send requests. It isn’t synced to the Postman cloud. Current values enable you to develop and test using private credentials or experimental values, without risk of exposing sensitive data to others on your team. Learn how todefine a current value for your variables.
You can set the variable type for global and environment variables as default type or secret type. When you create a variable, its type is automatically set to default type. You can set the variable to secret type to mask the initial and current values.
Default type - Default type is automatically assigned to variables. This type displays as plain text and doesn’t have extra properties.
Secret type - Secret type masks the initial and current values. This helps you avoid unintentionally sharing sensitive tokens, for example, during screen sharing or live streaming.
To set a variable to secret type, click theType dropdown list next to a global or environment variable, and selectsecret. To change the variable back to default type, click theType dropdown list, and selectdefault.
Postman recommends that you use yourPostman Vault to store sensitive data, such as API keys, as encrypted vault secrets. Only you can access and use values associated with your vault secrets, and they aren’t synced to the Postman cloud.
Provide an initial value for a variable to sync its value with the Postman cloud and share it with your team. Even if you’ve shared an initial value, you can continue to update your current value without affecting the initial value.
You can choose to sync your current value with the Postman cloud. Enter a new initial value or you can persist your current value, sharing it with your team. To persist the current value to the initial value, clickView more actions next to a variable and selectPersist. This updates the variable’s initial value based on your current value.
You can also reset your current value, returning it to the value shared in the initial value. ClickView more actions next to a variable and selectReset.
To persist or reset all variables, clickView more actions at the top of the column, then selectPersist all orReset all.
You can use the Postman Console totroubleshoot your requests. You can also use the Console to debugpre-request scripts andtests scripts, logging output to the Console. To open the Postman Console, click
Open Postman console at the top of the sidebar.

You can convert an API request into a code snippet in the language of your choice. Available languages and frameworks include cURL, Node.js, Python, and more.
To generate a code snippet, open an HTTP request, then clickCode (belowSend). Select alanguage or framework from the dropdown list, then copy the code snippet to your clipboard.
You can view and edit cookies associated with different domains. You can then use the cookies stored in the cookie jar when sending HTTP requests in Postman.
To manage cookies in the Postman VS Code extension, open an HTTP request, then selectCookies (belowSend).
You can also open the cookie editor with the
Postman: Open cookies editorcommand in theCommand Palette.
To learn more about using cookies in Postman, seeCreate and capture cookies using Postman’s cookie manager.
Last modified: 2025/08/22
Explore ready-to-use Collection Templates, build API-first workflows with Postman Flows, and more!