Articles → ASP .NET WEB API → Debug Web API Using Fiddler

Debug Web API Using Fiddler






Software Requirement





Creating Get And Post Method




public string Get()
{
    return "value";
}

[HttpPost]
public void Post()
{
            
}




  1. Get method is returning a hard coded value ‘value’.
  2. Post method does not have anything inside it.

Open Fiddler




  1. Run the application using visual studio and run fiddler.
  2. Go to Composer tab (See the following figure)
  3. Picture showing the Composer tab where service URL and verb can be defined
    Click to Enlarge

  4. Select the ‘Get’ verb and enter the URL.
  5. Now click on ‘Execute’ button on the right-hand side (See the following figure)
Picture showing the execute button in the fiddler
Click to Enlarge



Picture showing the break point hit for Get method in web API controller
Click to Enlarge



Picture showing the service calls recorded in fiddler
Click to Enlarge





Picture showing the request and response header in fiddler
Click to Enlarge






Posted By  -  Karan Gupta
 
Posted On  -  Saturday, January 30, 2016

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250