From 32e39bdd2082497f6a2b747d6f3d5aa62af86edf Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Wed, 2 Aug 2023 14:05:40 -0700 Subject: [PATCH] .http files, Endpoint Explorer GA (#29977) --- aspnetcore/test/http-files.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/aspnetcore/test/http-files.md b/aspnetcore/test/http-files.md index be1f9f8fdd..5abc68da5b 100644 --- a/aspnetcore/test/http-files.md +++ b/aspnetcore/test/http-files.md @@ -5,7 +5,7 @@ description: Learn how to use .http files in Visual Studio 2022 to test ASPNET C monikerRange: '>= aspnetcore-8.0' ms.topic: how-to ms.author: tdykstra -ms.date: 05/11/2023 +ms.date: 08/01/2023 uid: test/http-files --- # Use .http files in Visual Studio 2022 @@ -26,7 +26,7 @@ The `.http` file format and editor was inspired by the Visual Studio Code [REST ## Prerequisites -* [Visual Studio 2022 version 17.6 Preview 6 or later](https://visualstudio.microsoft.com/vs/preview/) with the **ASP.NET and web development** workload installed. +* [Visual Studio 2022 version 17.6 or later](https://visualstudio.microsoft.com/vs/) with the **ASP.NET and web development** workload installed. ## `.http` file syntax @@ -150,8 +150,6 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th * Customize response preview * Per-request settings -The Visual Studio 2022 `.http` file editor is still in preview, and some of these features might be added in the future. - ## Use the `.http` file editor Create an `.http` file by using the **Add New Item** dialog or by renaming the extension of any text file to `.http`. Send a request by selecting the green "run" button to the left of the request. The response appears in a separate pane. @@ -179,10 +177,6 @@ Create an `.http` file by using the **Add New Item** dialog or by renaming the e **Endpoints Explorer** is a tool window in Visual Studio 2022 that provides a UI that integrates with the `.http` file editor for testing HTTP requests. -### Enable Endpoints Explorer - -**Endpoints Explorer** is still a preview feature. It's available in [Visual Studio 2022 version 17.6 Preview 6 and later](https://visualstudio.microsoft.com/vs/preview/), and you have to enable it. To do that, select **Tools** > **Options** > **Environment** > **Preview Features** > **Web API Endpoints Explorer**. - ### Open Endpoints Explorer Select **View** > **Other Windows** > **Endpoints Explorer**. @@ -193,9 +187,8 @@ Right-click a request in **Endpoints Explorer** and select **Generate Request**. :::image type="content" source="~/test/http-files/_static/generate-request.png" alt-text="Endpoints Explorer window showing request context menu with 'Generate Request' menu selection highlighted."::: -* If an `.http` file is open in the editor, the request is added to that file. -* If an `.http` file isn't open and one exists in the project, the file is opened and the request is added to that file. -* If no `.http` file exists in the project, one is created with the project name as the file name, and the request is added to that file. +* If an `.http` file with the project name as the file name exists, the request is added to that file. +* Otherwise, an `.http` file is created with the project name as the file name, and the request is added to that file. The preceding screenshot shows endpoints defined by the minimal API project template. The following example shows the request that is generated for the selected endpoint: