Postman Export
Rext HTTP can export your requests as Postman Collections v2.1, automatically translating @capture, @assert, @pre, and @group to their native Postman equivalents.
How to Export
Section titled “How to Export”From the Editor
Section titled “From the Editor”- Open a
.rextfile - Place your cursor on a request
Ctrl+Shift+P→ “Rext: Export Request”- Select ”📦 Postman Collection”
From the Sidebar
Section titled “From the Sidebar”- Full file — Right-click a file → 📦 Export to Postman
- Collection — Click the 📦 button on the collection header, or right-click → Export to Postman
- Group — Click the 📦 button on the group header, or right-click → Export to Postman
From the Results Panel
Section titled “From the Results Panel”- Execute a request
- In the results panel, click Export ▾
- Select 📦 Postman Collection
Export Entire Workspace
Section titled “Export Entire Workspace”Ctrl+Shift+P → “Rext: Export All to Postman Collection” — exports all .rext files in the workspace as a single collection.
Directive Translation
Section titled “Directive Translation”@capture → Test Scripts
Section titled “@capture → Test Scripts”@capture env.token = body.access_token@capture global.apiKey = body.key@capture collection.refreshToken = body.refresh_tokenBecomes:
pm.environment.set("token", pm.response.json().access_token);pm.globals.set("apiKey", pm.response.json().key);pm.collectionVariables.set("refreshToken", pm.response.json().refresh_token);@assert → pm.test()
Section titled “@assert → pm.test()”@assert status == 200@assert body.email exists@assert body.items isArray@assert body.name contains "John"Becomes:
pm.test("status == 200", function () { pm.response.to.have.status(200);});pm.test("body.email exists", function () { var jsonData = pm.response.json(); pm.expect(jsonData.email).to.exist;});@group → Folders
Section titled “@group → Folders”@group Auth/LoginCreates nested folders Auth > Login in the Postman collection.
@pre → Pre-request Scripts
Section titled “@pre → Pre-request Scripts”@pre abc123Translates to a pm.sendRequest() in the Pre-request Script that executes the referenced request with its URL, method, headers, and body.
External Pre-requests
Section titled “External Pre-requests”When exporting a request with @pre and the pre-request is not included in the export:
- Rext searches for the pre-request across the workspace
- Shows a dialog asking:
- “Yes, include” — Adds the pre-request as an additional item in the Postman collection
- “No, just pm.sendRequest()” — Keeps only the inline script
Output Format
Section titled “Output Format”The exported file is a standard Postman Collection v2.1 JSON:
{ "info": { "name": "My Collection", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [...]}You can import it directly into Postman with File → Import.