Get Started
This page takes you from installing DotFetch to sending a request that uses a variable from your .env file.
1. Install
In VS Code, open the Extensions view (Ctrl+Shift+X, or Cmd+Shift+X on macOS), search for DotFetch, and click Install.
Or press Ctrl+P and run:
ext install FreeRave.dotfetch
After installing, a DotFetch icon appears in the Activity Bar. It opens a sidebar with four sections:
| Section | What it holds |
|---|---|
| Quick Actions | New Request, Import cURL, and your Favorites |
| Collections | Requests you saved, grouped into collections |
| History | Every request you sent, newest first |
| Environments | Your .env files and the variables inside them |
2. Send your first request
- Click New Request in Quick Actions. The Request Builder opens as an editor tab.
- Leave the method on
GETand type this URL:https://httpbin.org/get?hello=world - Press Send, or
Ctrl+Enter(Cmd+Enteron macOS).
The response appears at the bottom:
{
"args": { "hello": "world" },
"headers": { "Host": "httpbin.org", "...": "..." },
"url": "https://httpbin.org/get?hello=world"
}Next to the word Response you see the status (200 OK), the time it took (312 ms), and the size (0.4 KB). The request is also added to History: a yellow spinner while it is sending, then a green icon for success or a red one for an error.
3. Send a POST with a JSON body
- Change the method to
POSTand the URL tohttps://httpbin.org/post. - Open the Body tab and paste:
JSON
{ "name": "Ada", "role": "admin" } - Press Send.
You don't need to add a Content-Type header. When the body is valid JSON and you haven't set one, DotFetch sends Content-Type: application/json for you. httpbin echoes your body back under "json".
4. Use a variable from .env
Hard-coding IDs and tokens into URLs gets old fast. Put them in a .env file at the root of your workspace instead:
# .env
BASE_URL=https://httpbin.org
USER_ID=42- In the Environments section,
default(the name DotFetch gives.env) now appears. Hover it and click the Set as Active Environment button, or right-click it and choose the same command. - Use the variables with double curly braces:
GET {{BASE_URL}}/anything/users/{{USER_ID}} - Press Send. httpbin shows the real URL that was sent:
JSON
"url": "https://httpbin.org/anything/users/42"
The Request Builder keeps {{USER_ID}} exactly as you typed it, and History shows it that way too. The value is only filled in at the moment the request is sent. Read Environments for multiple environments (dev, staging, production) and how values are resolved.
5. Save it
Press Ctrl+Alt+S (Cmd+Alt+S on macOS) or click 💾 Save, give the request a name, and choose a collection. It now appears under Collections, and one click loads it back. See Collections, Favorites & History.
Keyboard shortcuts
These work while the Request Builder tab is focused:
| Shortcut | Action |
|---|---|
Ctrl+Enter / Cmd+Enter | Send the request (press again while it's running to cancel) |
Alt+D | Focus and select the URL bar |
Ctrl+Alt+S / Cmd+Alt+S | Save to a collection |
Ctrl+Shift+Backspace / Cmd+Shift+Backspace | Clear the form |
? | Show or hide the shortcuts help |
Escape | Close the open dialog |
Settings
Open Settings and search for dotfetch:
| Setting | Default | What it does |
|---|---|---|
dotfetch.timeout | 10000 | Default timeout in milliseconds (1000–300000) |
dotfetch.retryCount | 0 | Default number of retries when the server can't be reached (0–5) |
dotfetch.sslVerify | true | Verify TLS certificates by default |
dotfetch.maxHistory | 50 | How many requests History keeps. Older entries are dropped. |
The first three are defaults: a new request starts with them in its ⚙️ tab, and you can change them there for that one request. See Request settings.
Next steps
- Requests & Responses: everything in the Request Builder
- Authentication: add a token or API key
- Scripting Overview: automate tokens, signatures, and tests