Skip to content

Commit 4a6f04a

Browse files
Jan JahodaJan Jahoda
andauthored
Add HttpContent missing API (#4748)
Co-authored-by: Jan Jahoda <[email protected]>
1 parent e3b38ed commit 4a6f04a

File tree

1 file changed

+64
-23
lines changed

1 file changed

+64
-23
lines changed

xml/System.Net.Http/HttpContent.xml

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,18 @@
226226
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="net-5.0" />
227227
</Parameters>
228228
<Docs>
229-
<param name="stream">To be added.</param>
230-
<param name="cancellationToken">To be added.</param>
231-
<summary>To be added.</summary>
232-
<returns>To be added.</returns>
233-
<remarks>To be added.</remarks>
229+
<param name="stream">The target stream.</param>
230+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
231+
<summary>Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the <paramref name="stream" /> parameter.</summary>
232+
<returns>The task object representing the asynchronous operation.</returns>
233+
<remarks>
234+
<format type="text/markdown"><![CDATA[
235+
236+
## Remarks
237+
This operation will not block. The returned <xref:System.Threading.Tasks.Task> object will complete after all of the content has been written to the stream object passed as the `stream` parameter.
238+
239+
]]></format>
240+
</remarks>
234241
</Docs>
235242
</Member>
236243
<Member MemberName="CopyToAsync">
@@ -257,12 +264,19 @@
257264
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="net-5.0" />
258265
</Parameters>
259266
<Docs>
260-
<param name="stream">To be added.</param>
261-
<param name="context">To be added.</param>
262-
<param name="cancellationToken">To be added.</param>
263-
<summary>To be added.</summary>
264-
<returns>To be added.</returns>
265-
<remarks>To be added.</remarks>
267+
<param name="stream">The target stream.</param>
268+
<param name="context">Information about the transport (channel binding token, for example). This parameter may be <see langword="null" />.</param>
269+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
270+
<summary>Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the <paramref name="stream" /> parameter.</summary>
271+
<returns>The task object representing the asynchronous operation.</returns>
272+
<remarks>
273+
<format type="text/markdown"><![CDATA[
274+
275+
## Remarks
276+
This operation will not block. The returned <xref:System.Threading.Tasks.Task> object will complete after all of the content has been written to the stream object passed as the `stream` parameter.
277+
278+
]]></format>
279+
</remarks>
266280
</Docs>
267281
</Member>
268282
<Member MemberName="CreateContentReadStream">
@@ -688,10 +702,19 @@
688702
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-5.0" />
689703
</Parameters>
690704
<Docs>
691-
<param name="cancellationToken">To be added.</param>
692-
<summary>To be added.</summary>
693-
<returns>To be added.</returns>
694-
<remarks>To be added.</remarks>
705+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
706+
<summary>Serialize the HTTP content to a byte array as an asynchronous operation.</summary>
707+
<returns>The task object representing the asynchronous operation.</returns>
708+
<remarks>
709+
<format type="text/markdown"><![CDATA[
710+
711+
## Remarks
712+
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after all of the content has been written as a byte array.
713+
714+
Once the operation completes, the <xref:System.Threading.Tasks.Task%601.Result%2A> property on the returned task object contains the byte array with the HTTP content.
715+
716+
]]></format>
717+
</remarks>
695718
</Docs>
696719
</Member>
697720
<Member MemberName="ReadAsStream">
@@ -817,10 +840,19 @@
817840
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-5.0" />
818841
</Parameters>
819842
<Docs>
820-
<param name="cancellationToken">To be added.</param>
821-
<summary>To be added.</summary>
822-
<returns>To be added.</returns>
823-
<remarks>To be added.</remarks>
843+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
844+
<summary>Serialize the HTTP content and return a stream that represents the content as an asynchronous operation.</summary>
845+
<returns>The task object representing the asynchronous operation.</returns>
846+
<remarks>
847+
<format type="text/markdown"><![CDATA[
848+
849+
## Remarks
850+
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.
851+
852+
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.
853+
854+
]]></format>
855+
</remarks>
824856
</Docs>
825857
</Member>
826858
<Member MemberName="ReadAsStringAsync">
@@ -893,10 +925,19 @@
893925
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-5.0" />
894926
</Parameters>
895927
<Docs>
896-
<param name="cancellationToken">To be added.</param>
897-
<summary>To be added.</summary>
898-
<returns>To be added.</returns>
899-
<remarks>To be added.</remarks>
928+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
929+
<summary>Serialize the HTTP content to a string as an asynchronous operation.</summary>
930+
<returns>The task object representing the asynchronous operation.</returns>
931+
<remarks>
932+
<format type="text/markdown"><![CDATA[
933+
934+
## Remarks
935+
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after all of the content has been written as a string.
936+
937+
Once the operation completes, the <xref:System.Threading.Tasks.Task%601.Result%2A> property on the returned task object contains the string with the HTTP content.
938+
939+
]]></format>
940+
</remarks>
900941
</Docs>
901942
</Member>
902943
<Member MemberName="SerializeToStream">

0 commit comments

Comments
 (0)