This article is about testing WebAPI using Postman tool.It is one of the important topics in programmers world.Normally most of the programmers
think about testing webapi using postman.They have lots of questions mind like "How to pass get request of webapi to postman tool" and in turn what they will receive i.e response.
The postman tool consists of "Collections","APIS", "Environments" in the LEFT SIDE PANE.The right side pane is use to send or receive webapi request.
Collections: The user can create new collections for storing all the request APIs.
In the right side pane just click "+" symbol to create a new request
The programmers mostly use the below tabs to test WebAPI.
{
"Email":'usmtechworld@gmail.com',
"password":'xxxx'
}
{
<email"> 'usmtechworld@gmail.com' </email">,
<password"> 'xxxxx' <password">,
}
{ {
"status":"OK",
"data":
{
"message": "Login Successful"
}
}
REQUESTS:
https://usmtechworld.com/usmidentity/connect/token
Headers:
content-type: application/x-www-form-urlencoded
Body:
select "Raw" option and give following
username='usmtechworld@gmail.com'&password='xxxx'&grant-type=password
"access_token":"dfdfdsfsdfdsf4fggfghfgdsffdstgner4w36754",
"expires_in":"20/3/2022"
and you can send whatever extra parameter you need in response.