Skip to content

Commit 6ab28e5

Browse files
add more info about null values in variables (#36124)
1 parent 70d9e74 commit 6ab28e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

aspnetcore/test/http-files.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Use .http files in Visual Studio 2022
33
author: tdykstra
44
description: Learn how to use .http files in Visual Studio 2022 to test ASPNET Core apps.
55
monikerRange: '>= aspnetcore-8.0'
6-
ms.topic: how-to
76
ms.author: tdykstra
8-
ms.date: 01/19/2024
7+
ms.date: 09/16/2025
8+
ms.topic: how-to
99
uid: test/http-files
1010
---
1111
# Use .http files in Visual Studio 2022
@@ -112,6 +112,8 @@ Lines that start with either `#` or `//` are comments. These lines are ignored w
112112
## Variables
113113

114114
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.
115117

116118
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:
117119

@@ -543,6 +545,7 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th
543545
* Prompt variables
544546
* Customize response preview
545547
* Per-request settings
548+
* Null-handling variables, e.g. using null-conditional or nullish coalescing operators (this is also unsupported in Visual Studio Code)
546549

547550
## Create an `.http` file
548551

0 commit comments

Comments
 (0)