In the previous tutorials, we created our first simple Web API project. Now we will learn how to test Web API locally to check request & response during development.
We can use the following third party tools for testing Web API.
Web API - Testing Fiddler Tool
Any browser may use Fiddler as a free debugging proxy. It may be used to send, receive, and send back various HTTP requests to our Web API. It can also be used to examine the HTTP answer. Let's try sending an HTTP request to our local Web API and using Fiddler to monitor the response.
Let's see how to use Fiddler to send an HTTP request to our local Web API and check the response.
Step 1: Download and install Fiddler from here.
https://www.telerik.com/fiddler
Step 2: After successful installation click on Fiddler.exe to open Fiddler. It will look like the image below.
Step 3: Once the Fiddler is successfully installed or added in your browser, Now open the Postman. It will look like the image displayed below.
Step 4: GET Request using Fiddler
Select the HTTP Method as GET and enter the URL of your Web API as displayed in the below image.
Step 5: Once you click on the Execute button, an HTTP request is sent to the provided URL. The response coming from the Web API Server is displayed in the below image.
Similarly, you can test the POST, PUT and DELETE verbs Requests also.