Thunder Client(VS Code Extension)

Thunder Client(VS Code Extension)

An amazing alternative for the postman to test the Rest API's

Hi everyone! it has been 2 years since I landed in this IT field from then I am using postman to test my Rest API's which was cool for some time, but later I found it lazy to switch between the postman and vs code tabs. So I tried searching for other alternatives that's when I found this beautiful extension called "Thunder Client".

ThunderClinet Extension.PNG It is a simple lightweight Rest API Client Extension for Visual Studio Code. So let's make our hands dirty with this beautiful extension. Once you install this extension you will find a thunder client logo on the left side of vs code.

image.png When you click on the thunder client logo you will see the thunder client options on the right side. So let's have a look at these options. image.png 1.) New Request - We can create new requests (GET, POST, PUT, DELETE, etc..,)

image.png 2.) Activity tab - The activity tab shows you the previous API requests you have created.

image.png So if you see the response in the above snippet I got unauthenticated, so we need to add the auth token along with the API. Now we will see how to add the auth token and use it as a variable. Remember we have an environment tab, so we will make use of it to add the auth token.

3.) Environment tab - It is used to store the constant's just like the environment.ts file in Angular. Now let's add our auth token. In the environment tab, we have an option to create a new environment file, so let's create a new environment file I am naming it as vault and I am storing my auth token inside it under some variable.

image.png After adding the changes, I am going back to the request file. So here I am choosing Basic Auth and I am adding my auth token as a variable which I have added in the vault file in the Bearer token text box.

image.png 4.) Collections - You can create your own API collections or you have an option to import the API collections.

image.png

I've completely replaced the Postman with this extension in VS Code! The Thunder Client extension for VS Code can do everything I need to when testing HTTP Requests. So what are you waiting for go and install Thunder client VS code extension and make your hands dirty too.