You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/test/http-files.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Use .http files in Visual Studio 2022
3
3
author: tdykstra
4
4
description: Learn how to use .http files in Visual Studio 2022 to test ASPNET Core apps.
5
5
monikerRange: '>= aspnetcore-8.0'
6
-
ms.topic: how-to
7
6
ms.author: tdykstra
8
-
ms.date: 01/19/2024
7
+
ms.date: 09/16/2025
8
+
ms.topic: how-to
9
9
uid: test/http-files
10
10
---
11
11
# Use .http files in Visual Studio 2022
@@ -112,6 +112,8 @@ Lines that start with either `#` or `//` are comments. These lines are ignored w
112
112
## Variables
113
113
114
114
A line that starts with `@` defines a variable by using the syntax `@VariableName=Value`.
115
+
The variable name is case-sensitive and can't contain any spaces.
116
+
The value can contain any characters, including the value `null` to represent a null value.
115
117
116
118
Variables can be referenced in requests that are defined later in the file. They're referenced by wrapping their names in double curly braces, `{{` and `}}`. The following example shows two variables defined and used in a request:
117
119
@@ -543,6 +545,7 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th
543
545
* Prompt variables
544
546
* Customize response preview
545
547
* Per-request settings
548
+
* Null-handling variables, e.g. using null-conditional or nullish coalescing operators (this is also unsupported in Visual Studio Code)
0 commit comments