Endpoint Explorer in Visual Studio 2022

In VS 2022, there is new feature which can be useful to test our api’s.

In case we do not have Swagger, we can use Endpoint explorer from VS and can test and play with API’s endpoints.

Steps.

Open any API project and Go to View->Other windows->Endpoint Explorer as per below screen.

After opening Endpoint Explorer we have below left window from where we can see all listed api’s endpoints in applications.

Let’s Invoke

Right click on endpoint and click on generate Request


We will have below window, we can click on send request button and get response


we will get response in new window as below

GET by Id, I have updated id as per request url and get corresponding response.


Next Step.

We can save this above middle window as file with .http extension and can use next time without going to end point explorer. We can say this file is ready made rest client for playing and testing our endpoint.


I saved above file and used next file for testing purposes.

Thanks, Keep learning

line

Copyrights © 2024 letsupdateskills All rights reserved