Provide the following fields (name, email, password, and passwordConfirm) in the JSON or Form-encode tabs of the Body tab. Enter the signup endpoint URL and change the HTTP method to POST. Next, create a new POST request in the Auth folder and name it Sign Up. You can look at the screenshot below and create a similar folder structure. Now drag and drop the Get All Products request file into the Products folder. Type Products as the folder name or give it a different name and press enter. Hover your mouse over the collection name then click on the three dots and select the New Folder menu. The e-commerce REST API has different resources like Users, Products, Reviews, Auth, and more so it’ll make a lot of sense to group the related requests in their own folder within the Collection. If you are also using my REST API then type this URL then click on the Send button to make a GET request to the products endpoint and you should see a list of products in the response returned by the server. VS Code Thunder Client: Creating subfolders in the collection In my case since my API is an e-commerce REST API, my first request will be Get All Products. Hover your mouse on the collection name then click on the three dots on the right side and select the New Request menu.Įnter the request name and press enter. Now type the collection name and press the enter key. To create your first collection, click on the Collections tab then click on the hamburger menu on the right of the filter activity search bar and select the New Collection menu from the popup. We can make many HTTP requests by opening new tabs but it’s always a good idea to organize those HTTP requests in a collection. Walaa… you just made your first Thunder Client request and you should see a welcome message. Click on the New Request button and click on the Send button in the New Request tab. Let’s get our Thunder Client welcome message before going deep into the features it offers. The dashboard displays your recent activities, collections, and environments. Now, click on the Thunder Client log on the left sidebar of VS Code and you should see the Thunder Client dashboard. A collection is like a folder that helps us organize related HTTP requests together. If you are familiar with Postman then you’ll probably know about collections. VS Code Thunder Client: Creating Collection Once the Thunder Client extension has been installed you should see the Thunder Client logo on the left sidebar. In this article, you’ll learn how to make HTTP requests to a RESTful API or GraphQL API with the Thunder Client extension in VS Code by using an e-commerce REST API as an example. The VS Code Thunder Client extension was released at the end of March 2021 but at the time of writing this article, it already has 794,821 installs which is an indicator of how popular it has become. The Thunder Client extension is similar to Postman but with fewer features and it was created by Ranga Vadhineni. When we talk about API testing Postman is the tool most developers use because of the variety of features it provides to make API testing faster and easier.Ī few months ago the Thunder Client VS Code API testing extension caught my attention. VS Code is fast and lightweight and it supports a wide variety of programming languages and extensions.Īlso, it supports development operations like debugging, version control, and task running. Over the years VS Code has grown to become the default editor for new and old developers. Visual Studio Code is a free and open-source editor developed and maintained by Microsoft.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |