Skip to Content
CLIRun Requests

Run Requests

The CLI and extension are integrated seamlessly, so you can access request data from the terminal without any additional configuration.

  • To execute requests, run tc 'requestNameOrId'. The request can be executed using an id, name, or partial name.

img


As shown in the image, executing requests from the CLI is easy. The output is formatted with Status, Response with Syntax highlighting and VS Code theme, and Test results.

To run the same request from the UI requires multiple steps, as shown below:

  • Open Sidebar
  • Click Collections Tab
  • Open collection User and folder Account
  • Then open Welcome request
  • Now execute the request

Output Log

By default, when you execute a request, Status, Response, and Test Results are displayed. You can control the output with the --log argument.

  • Log options for a request: 0=All Data, 1=ReqHeaders, 2=ReqBody, 6=ResHeaders, 7=ResBody, 8=Tests
  • Example: tc 'welcome' --log 1,2,7 will display request headers, request body, and response body.

Open Request UI from CLI

If you want to quickly execute a request in the extension UI, you can do it easily from the CLI using the --ui argument.

  • tc 'welcome' --ui to open a request in the UI and run it automatically
  • tc 'welcome' --ui2 to open a request in the UI without auto-running.

img

VS Code Themes in Terminal

We were the first to introduce VS Code themes into the terminal.

img Bearded Arc Theme (left) — Rose Pine (right)

img One Dark Pro (left) — Night Owl (right)

Last updated on