In Visual Studio 2022 v17.5, a new feature was introduced that allowed you to execute HTTP requests directly from the Visual Studio IDE. This is great of you want to test an API endpoint without leaving your IDE.
To use this feature, open a Visual Studio project, right click on it and choose Add –> New Item. Search for http to find the HTTP file template, specify a name and click on Add.
Now we can start writing our HTTP requests inside this file. You even get Intellisense while building up your requests.
Once you are done, you can either click on the play icon next to the line or right click on the line and choose Send Request from the context menu.
It is possible to have multiple calls in the same file, therefore separate your requests with a comment line using three hashes:
You can also create variables by prefixing them with an @ and use these variables using double curly braces: