How to test Web API Method using PostMan tool? (Part 3)


In previous post,i.e. How to do CRUD operations in asp.net WEB API we have already written the CRUD operation methods using WEB API, but on browser we cannot test all methods, we have to take help of some external tool like fiddler or postman tool for testing all the methods.

what is the postman tool ?
Postman is a Google Chrome app for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses.
Using Postman we can easily test the rest enable service like web api.

How to Install the postman tool ?

>> Search the postman in google then install it
OR
download from given the path https://chrome.google.com/webstore/category/extensions?hl=en

How to test the WEB API Get method using postman ?

Step 1: Lunch the postman tool

Step 2: Give the URL of get method as given below image then click on Send button. You will get the result as given below.
If get method execute successfully, you will get status 200 OK.

How to test the WEB API POST method using postman ?

Step 1: Lunch the postman tool

Step 2: Give the URL of POST method as given below image then click on Send button. You will get the result as given below.
If get method execute successfully, you will get status 201 Created.

How to test the WEB API PUT method using postman ?

Step 1: Lunch the postman tool

Step 2: Give the URL of PUT method as given below image then click on Send button. You will get the result as given below.

How to test the WEB API Delete method using postman ?

Step 1: Lunch the postman tool

Step 2: Give the URL of DELETE method as given below image then click on Send button. You will get the result as given below.
If DELETE method execute successfully then you will get status 200 OK.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: