Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>jas-curl-runnerNew to Visual Studio Code? Get it now.
jas-curl-runner

jas-curl-runner

Amit Singh Awadhi

|
14 installs
| (1) | Free
Execute curl blocks from .jascurl files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JAS Curl Runner – User Guide

This guide explains how to use the JAS Curl Runner VS Code extension to execute cURL requests directly from .jascurl files using CodeLens.


1. What Is JAS Curl Runner?

JAS Curl Runner allows you to:

  • Write cURL requests in a structured file format
  • Define and reuse variables across requests
  • Group and scope variables for different environments
  • Execute requests with a single click using CodeLens buttons in VS Code

No external tools like Postman are required.


2. Getting Started

2.1 Create a .jascurl File

Create a new file with the .jascurl extension in VS Code. All examples below use this file type.


3. Writing Your First Request

@id = 1
@baseUrl = https://jsonplaceholder.typicode.com

### Get User
curl -X GET {{baseUrl}}/users/{{id}}

How It Works

  • Lines starting with @ define variables
  • ### marks a request block
  • {{variable}} is replaced at runtime
  • A ▶ Execute Curl CodeLens button appears above each request

4. Executing Requests

  1. Hover over the request title (e.g., ### Get User)
  2. Click the ▶ Execute Curl button
  3. Output appears in the VS Code terminal/output panel

5. Variables

5.1 Global Variables

@token = abc123
@baseUrl = https://api.example.com

Global variables are available to all requests in the file.

5.2 Using Variables in cURL

curl -X GET {{baseUrl}}/users \
    -H "Authorization: Bearer {{token}}"

6. Group Variables

Groups allow you to define reusable variable sets for different environments or scenarios.

@fetch:group = {
    id = 10
    role = admin
}

7. Group Requests

Scopes allow a request to use variables from a specific group.

### Get Users
#group = @fetch
@id = 11
curl -X GET https://jsonplaceholder.typicode.com/users/{{id}}

Important: Request-level variables override group variables. Here, id = 11 overrides id = 10.


8. Variable Resolution Order

Variables are resolved in this priority:

  1. Request-level variables
  2. Group variables
  3. Global variables

The closest scope always wins.


9. Assertions (Optional)

Assertions help verify API responses.

@assert:status = 200
@assert:body.id exists

If an assertion fails, it will be reported in the output.


10. Running Multiple Requests

Each request block has its own ▶ Execute button. You can run requests individually or in sequence.


11. Best Practices

  • Keep global variables at the top of the file
  • Use groups for related APIs or environments
  • Override values only when necessary
  • Avoid hardcoding sensitive tokens
  • Use descriptive request names (e.g., ### Get User by ID)

12. Common Mistakes

Mistake Reason
Using variables before defining them Variables must be declared first
Misspelling variable names Variable names are case-sensitive
Forgetting ### before request name CodeLens will not appear
Using spaces in variable names Use underscore or camelCase instead

13. Appearance & Customization

The JAS Curl Runner integrates seamlessly with VS Code's default theme. CodeLens buttons appear in a subtle gray color above request blocks for easy visibility without cluttering the editor.


14. Requirements

  • Visual Studio Code v1.60 or later
  • Node.js v16 or later

15. Known Limitations

  • No streaming response support
  • Minimal UI output
  • No environment file support yet

16. Feedback & Support

If you encounter issues or have feature requests, please open an issue in the repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft