Thunder Client Support Versions Save

Thunder Client is a lightweight Rest API Client Extension for VS Code.

v2.21.15

2 weeks ago

New Features

  • Restore previous open tabs on vscode reload #1462
  • Enable Right click and Run on the collections view #1528

Bug Fixes

  • Fix - Collection requests don't run in a defined order #1425

Run Request

  • Now you can right-click on a request and execute it Screenshot 2024-04-25 at 06 50 12

v2.21.0

1 month ago

Documentation Site

Load Modules from Path

  • We are launching a new API for loading modules from a path.
  • This functionality is useful for loading private modules or modules hosted on registries other than npm.
  • The module path can be relative to the project root or an absolute path.
var moment = tc.loadFromPath("thunder-tests/packages/node_modules/moment");

VS Code Floating window

Bug Fixes

  • Fix - Enter key is added space in env #1515

v2.20.0

1 month ago

Improved Loading of Node Modules

  • We have improved the loading of Node Modules from scripts #1434, #1442, #1429, #1405
  • Now you can load any node module like mongodb, oracledb, node-postgres, @azure/identity etc..
  • Update CLI to v1.13.0

Load Module syntax

const oracledb = await tc.loadModule("oracledb");
console.log(oracledb);

Database Improvements

  • We are planning to split collection into multiple request files to reduce merge conflicts
  • Please let us know your feedback #1507

v2.19.5

2 months ago

New Features

  • Show unsaved indicator #1493
  • New API that allows setting the body in the Pre-Request script.
  • JSON File Indent Size vscode setting added
  • Update CLI to v1.12.13

Set Body From Script

  • We are introducing a new API that allows setting the body in the Pre-Request script.
  • Please see examples of how to use - docs
tc.request.setBody({
    color:"red"
  });

JSON File Indent Size vscode setting

Screenshot 2024-03-12 at 16 52 23

v2.19.4

2 months ago

New Features

  • Open scripting tab when click on request>tests if tests>tests tab is empty #1494
  • To save only failed request responses in an HTML report, utilize the htmlReportResponseLimit setting.

Bug Fixes

  • Unable to copy text from Chart visualization #1463
  • Authorization tokens not recognized #1496

v2.19.0

2 months ago

New Features

  • Better Server Sent Events (SSE) support #705, #319
  • Add Web Socket support #3, #336, #857
  • Ignore skipped flag on CLI run for --reqlist cmd #1489
  • Add a confirmation box when deleting requests #1487
  • Update CLI to v1.12.1

Bug Fixes

  • File Not Found (CLI v1.12.0, and UI v2.18.0) #1488
  • Fix Run Col Slow in CLI #1486

Web Socket & SSE Support

Screenshot 2024-03-06 at 09 55 02

v2.18.0

2 months ago

New Features

  • Autocomplete Environment variables #151, #1194
  • Allow Skip Folder Option in Run Collection #1476
  • Skip Collection option in CLI for Run ALL Collections
  • Save Active Environment selection changes to local memory #1250, #448
  • Set a field Content Type in a Multi-Part Form Request #1482
  • Enable Resource field for OAuth Password grant type #1479
  • Clear URL Autocomplete History #1484
  • Update CLI to v1.12.0

Bug Fixes

  • Error when sending request: ENOENT: no such file or directory #1483

Autocomplete Environment Variables

  • The extension will automatically complete the environment variables as you start typing {{.
Screenshot 2024-02-26 at 12 36 56

Skip Folder in Run Collection

  • Now, you can use the Skip Folder option to skip multiple requests in the Run Collection view.
Screenshot 2024-02-26 at 12 47 41

Skip Collections in Run All

  • Now, you can skip collections when running all collections from the CLI.
  • e.g tc --col all --skip "ColA,ColB"

Active Environment Selection

  • Set Active Environment selection changes to local memory using the setting. This helps to avoid creating unnecessary Source Control activity. Screenshot 2024-02-26 at 13 20 40

Set Field Content-Type

  • Set a field Content Type in a Multi-Part Form Request by appending content-type to the field names Screenshot 2024-02-24 at 17 39 52

Clear URL Autocomplete History

  • You can clear the URL autocomplete history from the Request URL field. Screenshot 2024-02-26 at 12 56 28

v2.17.5

3 months ago

New Features

  • New await tc.retryRequest() function added to tc API
  • New DNS Test command added to Command Palette.
  • DNS resolve issues fixed for localhost
  • Update CLI to v1.11.6

Bug Fixes

  • Special characters get converted incorrectly in cURL import functionality #1472
  • JSON Schema for Schemavalidation gets Error in CI #1471

Retry Request Function:

  • New await tc.retryRequest() function added suitable for retrying same request when failed
  • Use example code below for retry request in Post Request script
let incrementCount = parseInt(tc.getVar('incrementCount') || "0");
let code = tc.response.status;

if(incrementCount <= 3 && code !== 200)
{
      incrementCount = incrementCount + 1
      tc.setVar('incrementCount', incrementCount)
      console.log("retrying request", incrementCount);

      await tc.delay(incrementCount * 1000); // exponential delay of 1 secs
      await tc.retryRequest();
}
else
{
  tc.setVar('incrementCount', 0);
  console.log("reset incrementCount = 0");
}

DNS Test command

  • use DNS Test command for localhost connection issues
Screenshot 2024-02-03 at 13 22 32

v2.17.2

3 months ago

New Features

  • Thunder client save file didn't use the filename in content-disposition #1272, #1458
  • HTML Report filter Failed requests option

Html Report Filter dropdown

Screenshot 2024-01-31 at 16 07 20

v2.17.0

4 months ago

New Features

  • Add Support For Responses Visualisation (Beta) #511
  • VS Code setting for default values for Request Headers #845
  • Allow to open multiple Run Collection tabs #1410
  • Consolidate iterations in reports to one table structure. #1412
  • Option to specify number of iterations from CLI #1411

Bug Fixes

  • Response color highlighting disappears after closing and reopening the editor tab #1438
  • Duplicate IDs in JSON after duplicating requests #1435
  • OAUTH2 Access token breaks on all versions higher that 2.14.1 #1439

Response Data Visualisation (Beta)

  • Create charts or tables from response using tc.chartHTML() from the Tests tab scripting
  • When you pass data to function tc.chartHTML(templace, data), the data is available in chart_data global variable
  • The feature is in Beta, please test and let us know feedback
var template = `
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.8/handlebars.min.js"></script>

    <div id="output"></div>
    <script id="entry-template" type="text/x-handlebars-template">
          <div class="entry">
            <h2>{{first_name}}</h2>
            <div class="body">
              {{email}}
            </div>
          </div>
    </script>

    <script>
        var source = document.getElementById("entry-template").innerHTML;
        var template = Handlebars.compile(source);
    
        document.getElementById("output").innerHTML = template(chart_data[0]);
    </script>
`;

var data = tc.response.json.data;
tc.chartHTML(template, data);

Default Headers

  • You can now set default headers for requests using setting thunder-client.defaultHeaders
Screenshot 2024-01-03 at 16 39 43