Skip to content

Commit e452974

Browse files
authored
Update docs/fundamentals/networking/http/httpclient-migrate-from-httpwebrequest.md
1 parent f60a11f commit e452974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/fundamentals/networking/http/httpclient-migrate-from-httpwebrequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ request.AllowWriteStreamBuffering = false; // Default is `true`.
601601

602602
In `HttpClient`, there are no direct equivalents to the `AllowWriteStreamBuffering` and `AllowReadStreamBuffering` properties.
603603

604-
`HttpClient` does not buffer request bodies on its own, instead delegating the responsibility to the `HttpContent` used. Contents like `StringContent` or `ByteArrayContent` are logically already buffered in memory, while using `StreamContent` will not incur any buffering by default. To force the content to be buffered, you may call `HttpContent.LoadIntoBufferAsync` before sending the request. Here's an example:
604+
`HttpClient` doesn't buffer request bodies on its own, instead delegating the responsibility to the `HttpContent` used. Contents like `StringContent` or `ByteArrayContent` are logically already buffered in memory, while using `StreamContent` won't incur any buffering by default. To force the content to be buffered, you may call `HttpContent.LoadIntoBufferAsync` before sending the request. Here's an example:
605605

606606
```csharp
607607
HttpClient client = new HttpClient();

0 commit comments

Comments
 (0)