Postman API Testing Tutorial | Postman Tutorial For Beginners 2022

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
postman one of the most used tool for testing different apis in this tutorial you will see how to use postman how to send different kind of requests how to send image or video for testing and some tips to manage structure of saving api so i am very excited about this and hope you are too so let's dive into this so first of all you need to install postman in your machine if you don't have postman then head over to postman.com and then download postman for your operating system and then install it if you only want to test two or three simple apis then i suggest you to install rapid api extension for vs code now open up postman and you can see we have two option sign in or create free account so i just click on this skip button and after that you are ready to test api so for now don't worry about this interface just click on this plus icon to create new folder or collection and give it a related name to your project and hit enter so save all apis from one project in this single collection now to test api you need to create request so click on this three dots on your collection and select add request now at the top you can give this request name let's say fetching books data and you see it's updated here now we have one api called simple book api i will give this link in description box so here we get different kinds of apis for testing so first let's test this simple api for getting the list of books and request method is get so copy this url from here and back to postman here we enter our api url so paste that url here and at the end we add slash books now from this drop down we can select the method of our api 90 time we will use this 4 to 5 methods so here we need get method now to send request just click on this send button or you can press control plus enter or command plus enter and at the bottom we get our response this section display all data related to api response here you can see the status code which is 200 time for complete that request and the size of this response and at the end you can also save this response in postman or if you want to export that data in file then you can select save to file option now below that you will get couple of options for preview the data but pretty is really good option because we see data in clear structure so congratulation you successfully test get request now this section is very important for sending data with our api request so we know that we can send data as a query parameter so in postman we don't need to write query parameters in url just open this params tab and write here your parameters now in documentation we can see these query parameters for type and as value fiction or non-fiction so in postman we write here type and see we get this parameter in our url and in this value field we write friction now click on send button and see we get all books of fictional type now back to our documentation here we get single book information by using path parameters so how can we add path parameters in postman so i create a new request and give it a name fetching single book details now i paste that base url slash books slash colon book id and you see postman add this path parameter now here you can pass its value let's say 2 and click on send button see we get details about book id too here we can also directly pass id in url so i remove this book id and write here to and click on send see this also work now let's see the post request which is the same as the get request but the difference is that we have to send data in our request body so i have this login api which i created in my jwt tutorial because by this simple book api we can't access post request so i create one new request and give it a name called login now in the url i write my api url and select the post from this request methods now head over to this body section here you can see various type of data formats like form data url encoded raw etc so i select raw and from this drop down i select json you have to select appropriate format that the server accept if you want to test node api then most probably use raw and json data now i pass here data in json format email and password now click on send button and see we get login successful so this is how you send data with post request now sometimes we want to send data with our headers so move to this header section and here same as params we will add data in key value pair for example we want to send json web token as header so i write here variable name which is x or token and in the value i add token remember this variable name is the same as declared in back end now the most important part how we can send data like images videos and files with our request so for that move to body section and select form data now here you write your variable name for example video and at the right side you can see there is a drop down options text and file so if you want to send any type of file like image video or other types of file then select file and if you want to pass text then select text so i select file and see here we get select file option so click on that and select file and open that see we get our file now in the back end with this video variable we can get this file data now if you want to change theme font size font style or anything related to postman then click on this setting icon and select setting now in general tab you can change font size font style and many other things and in this theme tab you can select your postman theme dark or light and there are many other tabs for postman so there are nothing hard in using postman for api testing if you have some doubts then you can ask me in the comment section and a lot of interesting tutorials are coming so stay tuned and see you in the next video
Info
Channel: Code Bless You
Views: 435,928
Rating: undefined out of 5
Keywords: code bless you, api testing, Postman api testing tutorial, postman tutorial, how to use postman, api testing using postman, api testing with postman, how to use postman for api testing, postman tutorial for beginners, what is postman, using postman for api testing, postman, postman api testing, postman beginner tutorial, rest api, Postman Api Testing, api testing postman tutorial, api testing postman, api testing postman explained, postman tutorials for beginners, postman api
Id: CLG0ha_a0q8
Channel Id: undefined
Length: 8min 29sec (509 seconds)
Published: Tue Sep 06 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.