Skip to content

Commit 9714891

Browse files
authored
HttpContent: Buffering is implementation dependent (#10108)
1 parent f3162c8 commit 9714891

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xml/System.Net.Http/HttpContent.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ When the `disposing` parameter is `true`, this method releases all resources hel
879879
## Remarks
880880
881881
Note that this method will internally buffer the content unless <xref:System.Net.Http.HttpContent.CreateContentReadStream(System.Threading.CancellationToken)> has been implemented to do otherwise.
882+
For example, when using <xref:System.Net.Http.HttpClient>, a method such as <xref:System.Net.Http.HttpClient.SendAsync%2A> returns a class derived from <xref:System.Net.Http.HttpContent> that conditionally buffers based on what's passed for the `completionOption` parameter.
882883
883884
]]></format>
884885
</remarks>
@@ -1047,7 +1048,8 @@ When the `disposing` parameter is `true`, this method releases all resources hel
10471048
<format type="text/markdown"><![CDATA[
10481049
10491050
## Remarks
1050-
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after all of the stream that represents content has been read.
1051+
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after all of the stream that represents content has been read (unless <xref:System.Net.Http.HttpContent.CreateContentReadStream(System.Threading.CancellationToken)> has been implemented to do otherwise).
1052+
For example, when using <xref:System.Net.Http.HttpClient>, a method such as <xref:System.Net.Http.HttpClient.SendAsync%2A> returns a class derived from <xref:System.Net.Http.HttpContent> that conditionally buffers based on what's passed for the `completionOption` parameter.
10511053
10521054
Once the operation completes, the <xref:System.Threading.Tasks.Task%601.Result%2A> property on the returned task object contains the stream that represents the HTTP content. The returned stream can then be used to read the content using various stream APIs.
10531055

0 commit comments

Comments
 (0)