Thursday, October 12, 2023

Working with Fiddler to test Web API


Please refer the previous article 

https://dotnetbyudayrajakonda.blogspot.com/2023/10/creating-basic-aspnet-web-api.html

What is Fiddler?

The Fiddler is a free debugging proxy tool that is used for testing restful web services. We can use Fiddler to compose and execute different HTTP requests to our Web API and check the HTTP response.

Download the Fiddler software from the below URL

https://www.telerik.com/download/fiddler

click on the Fiddler.exe to open Fiddler






Next, click on Compose Tab as shown below






Now, enter the Web Api url which we created in the previous article and Hit Enter , you will see the response.

Request and Response Screen






Testing POST Request using Fiddler:

  • Select the Compose Tab,
    1. Then choose the HTTP verb as POST
    2. Set the Content-Type as application/JSON.
    3. In the request body, provide the string value that you want to add to the string array.
    4. Click on the Execute button as shown below.





    Testing PUT Request using Fiddler:
    1. Select the Compose Tab,
    2. Then choose the HTTP verb as PUT
    3. In the URL provide the index of the array element whose value you want to update.
    4. Set the Content-Type as application/json.
    5. In the Request body, provide the updated string value that you want to update into the string array.
    6. Finally, click on the Execute button as shown below.











    Testing DELETE Request using Fiddler:
    1. Select the Compose Tab,
    2. Then choose the HTTP verb as DELETE
    3. In the URL provide the index of the array element whose value you want to update.
    4. Finally, click on the Execute button as shown below.






    No comments:

    Post a Comment

    Thank you for visiting my blog

    Kubernetes

    Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...