Skip to content

Commit fd4d311

Browse files
guardrexCopilot
andauthored
Update aspnetcore/blazor/call-web-api.md
Co-authored-by: Copilot <[email protected]>
1 parent e2fba21 commit fd4d311

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aspnetcore/blazor/call-web-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ The solution includes a demonstration of obtaining weather data securely via an
358358
359359
## Disposal of `HttpRequestMessage`, `HttpResponseMessage`, and `HttpClient`
360360
361-
An <xref:System.Net.Http.HttpRequestMessage> without a body doesn't require explicit disposal with a [`using` declaration (C# 8 or later)](/dotnet/csharp/language-reference/keywords/using-directive) or a [`using` block (all C# releases)](/dotnet/csharp/language-reference/keywords/using), but we recommend disposing with every use for the following reasons:
361+
An <xref:System.Net.Http.HttpRequestMessage> without a body doesn't require explicit disposal with a `using` declaration (C# 8 or later, example: `using var request = new HttpRequestMessage(...);`) or a [`using` block (all C# releases, example: `using (var request = new HttpRequestMessage(...)) { ... }`)](/dotnet/csharp/language-reference/keywords/using), but we recommend disposing with every use for the following reasons:
362362
363363
* To gain a performance improvement by avoiding finalizers.
364364
* It hardens the code for the future in case a request body is ever added to an <xref:System.Net.Http.HttpRequestMessage> that didn't initially have one.

0 commit comments

Comments
 (0)