Thunder Client is a lightweight Rest API Client Extension for VS Code.
Parallel
#1088, #1363Skip request
featurev1.9.0
beta
, please test and let us know the feedback--concurrent
switch. e.g: tc --col "colName" --concurrent 5
Sidebar View
-> click ...
and select Cookie ManagerCommand Palette
-> search Cookie Manager
tc
API types file (v1.6.0)// get all cookies in store
var list = await tc.getCookies();
// get all cookies for current url
var listDomain = await tc.getCookies("url");
var listDomain = await tc.getCookies(tc.request.url);
// clear all cookies in store
await tc.clearCookies();
// clear all cookies for current domain
await tc.clearCookies("url");
await tc.clearCookies(tc.request.url);
// clear single cookie by name of cookie
await tc.clearCookies(tc.request.url, "cookieName");
// set cookie for current url
await tc.setCookie("https://www.thunderclient.com", "cookieName", "cookieValue");
await tc.setCookie(tc.request.url, "cookieName", "cookieValue");
Inline Scripting
support #1026expect
, assert
, and atob
, btoa
global variables added in scripting.v1.8.0
request
scope from the scripting
expect
and assert
functions are now global variablesatob
and btoa
are global variables useful for base64 encoding and decodingOLD way to use chai library
const chai = require("chai");
var expect = chai.expect;
var assert = chai.assert;
tc.test("Chai - Response code expect to be 200", function () {
expect(tc.response.status).to.equal(200);
})
NEW way of using global variables
tc.test("Chai - Response code expect to be 200", function () {
expect(tc.response.status).to.equal(200);
})
// get all cookies in store
var list = await tc.getCookies();
// get all cookies for current url
var listDomain = await tc.getCookies("url");
var listDomain = await tc.getCookies(tc.request.url);
// clear all cookies in store
await tc.clearCookies();
// clear all cookies for current domain
await tc.clearCookies("url");
await tc.clearCookies(tc.request.url);
// clear single cookie by name of cookie
await tc.clearCookies(tc.request.url, "cookieName");
// set cookie for current url
await tc.setCookie("https://www.thunderclient.com", "cookieName", "cookieValue");
await tc.setCookie(tc.request.url, "cookieName", "cookieValue");
querystring
format to form encoded #1354, #612setNull
built in filter addedv1.7.1
tc.request.getHeader
and tc.request.setHeader
helper functions added to tc object
tc.response.getHeader
helper function added to tc object
requests per collection limit to 50
.HTML report
in the Run Collection in the free version #1367The free version
will have a limit of 15 requests per collection from Sept 30th 2023
.
Please make sure you have read the free version terms
Cmd/Ctrl + Click
on the folder/collection will open collection settings
.chai
module is now included in the extension, no need to download externally - #1313v1.5.2
Example Code
var chai = require("chai");
var expect = chai.expect;
var assert = chai.assert;
function testChaiFilter() {
tc.test("Response code is 200", function () {
assert.equal(tc.response.status, 200)
})
tc.test("Response code expect to be 200", function () {
expect(tc.response.status).to.equal(200);
})
}
module.exports = [testChaiFilter]