Skip to content
Vegha VS Code

The request editor

Open a request from the Collections view and it opens in the Vegha Request Editor, a visual editor for the .bru file.

The editor is a VS Code custom editor over the .bru text. Every change you make is an edit to that file, so:

  • Undo/redo, the dirty marker and Save work as in any text file.
  • Git diff, blame and Source Control show the same plain text you’d see in the desktop app.
  • Switch to the raw file at any time with Open as Text, and back with Open in Vegha Editor.
  • Method and URL. Paste a cURL command into the URL bar to import the whole request.
  • Query and path parameters. :id style path parameters get their own table.
  • Headers, including headers inherited from the folder and collection.
  • Body: JSON, XML, text, GraphQL, form URL-encoded, multipart form and binary file.
  • Auth: see Authentication.
  • Scripts, assertions and captures: see Scripts & tests.
  • Chain: see Request chaining.

Press Send or Ctrl+Enter (Cmd+Enter). The response opens beside the editor with:

  • the body as pretty, raw or an HTML preview, with image previews;
  • headers, cookies, test results and console output;
  • a timing breakdown, the variables the request set, and the raw request that was sent.

A .bru file opened from the regular Explorer opens as text, with Send and Open in Vegha Editor CodeLens links above the request. Turn the links off with vegha.codeLens.enabled.

To always open requests in the visual editor, add this to your settings:

"workbench.editorAssociations": { "*.bru": "vegha.requestEditor" }

Collection, folder and environment .bru files are easier to edit as text, so leave the association off if you edit those often. Environment files have their own environment editor.

With the Vegha side bar showing and a request active, double-clicking the empty tab bar (or File › New File) opens an untitled GET request instead of a blank text file. Run Vegha: New Untitled Request to get one at any time. Turn this off with vegha.newUntitledOpensRequest.

In the Collections view you can create folders, rename, delete and drag requests between folders. Reveal in Explorer View jumps to the file. Copy as cURL and Copy as Code… (30+ languages and libraries) are on each request’s context menu.