Skip to content

Commit

Permalink
Http sync follow up (dotnet#4905)
Browse files Browse the repository at this point in the history
* Add the http sync follow up

* Fix closing tag

Co-authored-by: Jan Jahoda <jajahoda@.microsoft.com>
  • Loading branch information
2 people authored and gewarren committed Sep 24, 2020
1 parent f6775a5 commit 1baf681
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 160 deletions.
18 changes: 2 additions & 16 deletions xml/System.Net.Http/ByteArrayContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,7 @@
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Creates an HTTP content stream for reading. It uses the memory from the <see cref="T:System.Net.Http.ByteArrayContent" /> as a backing store.</summary>
<returns>The HTTP content stream.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content stream has been created.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateContentReadStreamAsync">
Expand Down Expand Up @@ -237,14 +230,7 @@ This operation blocks until all of the content stream has been created.
<param name="context">Optional information about the transport, like the channel binding token. This parameter can be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes and writes the byte array provided in the constructor to an HTTP content stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the whole byte array has been written to `stream` or until `cancellationToken` cancels the operation.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SerializeToStreamAsync">
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Net.Http/DelegatingHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read.
## Remarks
The <xref:System.Net.Http.DelegatingHandler.Send%2A> method is mainly used by the system and not by applications. When this method is called, it calls the <xref:System.Net.Http.DelegatingHandler.Send%2A> method on the inner handler.
Expand Down
36 changes: 4 additions & 32 deletions xml/System.Net.Http/HttpClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2695,14 +2695,7 @@ The <paramref name="requestUri" /> is not an absolute URI.
<param name="request">The HTTP request message to send.</param>
<summary>Sends an HTTP request with the specified request.</summary>
<returns>An HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">The HTTP version is 2.0 or higher or the version policy is set to <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down Expand Up @@ -2746,14 +2739,7 @@ The custom <see cref="T:System.Net.Http.HttpMessageHandler" /> does not override
<param name="completionOption">One of the enumeration values that specifies when the operation should complete (as soon as a response is available or after reading the response content).</param>
<summary>Sends an HTTP request.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">The HTTP version is 2.0 or higher or the version policy is set to <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down Expand Up @@ -2797,14 +2783,7 @@ The custom <see cref="T:System.Net.Http.HttpMessageHandler" /> does not override
<param name="cancellationToken">The token to cancel the operation.</param>
<summary>Sends an HTTP request with the specified request and cancellation token.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read or `cancellationToken` cancels the operation.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">The HTTP version is 2.0 or higher or the version policy is set to <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down Expand Up @@ -2854,14 +2833,7 @@ The custom <see cref="T:System.Net.Http.HttpMessageHandler" /> does not override
<param name="cancellationToken">The token to cancel the operation.</param>
<summary>Sends an HTTP request with the specified request, completion option and cancellation token.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read or `cancellationToken` cancels the operation.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">The HTTP version is 2.0 or higher or the version policy is set to <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down
9 changes: 1 addition & 8 deletions xml/System.Net.Http/HttpClientHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -866,14 +866,7 @@ handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousA
<param name="cancellationToken">A cancellation token to cancel the operation.</param>
<summary>Creates an instance of <see cref="T:System.Net.Http.HttpResponseMessage" /> based on the information provided in the <see cref="T:System.Net.Http.HttpRequestMessage" />.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the response message is read.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> was <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">For HTTP/2 and higher or when requesting version upgrade is enabled by <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down
40 changes: 6 additions & 34 deletions xml/System.Net.Http/HttpContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,7 @@
<param name="context">Information about the transport (for example, the channel binding token). This parameter may be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes the HTTP content into a stream of bytes and copies it to <paramref name="stream" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content is written to the stream object.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="stream" /> was <see langword="null" />.</exception>
</Docs>
</Member>
Expand Down Expand Up @@ -747,14 +740,7 @@ This operation blocks until all of the content is written to the stream object.
<Docs>
<summary>Serializes the HTTP content and returns a stream that represents the content.</summary>
<returns>The stream that represents the HTTP content.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the stream that represents content has been read.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReadAsStream">
Expand Down Expand Up @@ -782,14 +768,7 @@ This operation blocks until all of the stream that represents content has been r
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes the HTTP content and returns a stream that represents the content.</summary>
<returns>The stream that represents the HTTP content.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the stream that represents content has been read.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReadAsStreamAsync">
Expand Down Expand Up @@ -989,16 +968,9 @@ This operation blocks until all of the stream that represents content has been r
<param name="stream">The target stream.</param>
<param name="context">Information about the transport (for example, the channel binding token). This parameter may be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>When overridden in a derived class, serializes the HTTP content to a stream. Otherwise, throws a <see cref="T:System.NotImplementedException" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content has been serialized to the stream object.
]]></format>
</remarks>
<exception cref="T:System.NotImplementedException">The method is not overridden in the derived class.</exception>
<summary>When overridden in a derived class, serializes the HTTP content to a stream. Otherwise, throws a <see cref="T:System.NotSupportedException" />.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">The method is not overridden in the derived class.</exception>
</Docs>
</Member>
<Member MemberName="SerializeToStreamAsync">
Expand Down
4 changes: 2 additions & 2 deletions xml/System.Net.Http/HttpMessageHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@
<Docs>
<param name="request">The HTTP request message to send.</param>
<param name="cancellationToken">The cancellation token to cancel operation.</param>
<summary>When overridden in a derived class, sends an HTTP request with the specified request and cancellation token. Otherwise, throws a <see cref="T:System.NotImplementedException" />.</summary>
<summary>When overridden in a derived class, sends an HTTP request with the specified request and cancellation token. Otherwise, throws a <see cref="T:System.NotSupportedException" />.</summary>
<returns>The HTTP response message.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotImplementedException">The method is not overridden in the derived class.</exception>
<exception cref="T:System.NotSupportedException">The method is not overridden in the derived class.</exception>
</Docs>
</Member>
<Member MemberName="SendAsync">
Expand Down
11 changes: 1 addition & 10 deletions xml/System.Net.Http/HttpMessageInvoker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,7 @@
<param name="cancellationToken">The cancellation token to cancel operation.</param>
<summary>Sends an HTTP request with the specified request and cancellation token.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read.
Most applications that are connecting to a web site will use one of the <xref:System.Net.Http.HttpClient.Send%2A> or <xref:System.Net.Http.HttpClient.SendAsync%2A> methods on the <xref:System.Net.Http.HttpClient> class.
]]></format>
</remarks>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="request" /> was <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">For HTTP/2 and higher or when requesting version upgrade is enabled by <see cref="F:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher" />.

Expand Down
9 changes: 1 addition & 8 deletions xml/System.Net.Http/MessageProcessingHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,7 @@
<param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
<summary>Sends an HTTP request to the inner handler to send to the server.</summary>
<returns>The HTTP response message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until the entire response, including content, is read, or until `cancellationToken` cancels the operation.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SendAsync">
Expand Down
11 changes: 1 addition & 10 deletions xml/System.Net.Http/MultipartContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@
## Remarks
This method overrides <xref:System.Net.Http.HttpContent.CreateContentReadStream%2A?displayProperty=nameWithType> to use a custom stream that contains an array, with each HTTP content entity and its boundary encoded and serialized to a <xref:System.IO.MemoryStream> instance.
This operation blocks until all of the content has been written to the memory stream.
]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -447,14 +445,7 @@ This operation blocks until all of the content has been written to the memory st
<param name="context">Information about the transport (for example, the channel binding token). This parameter may be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes the multipart HTTP content to a stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks untill all of the content has been serialized to the stream object passed in the `stream` parameter.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SerializeToStreamAsync">
Expand Down
9 changes: 1 addition & 8 deletions xml/System.Net.Http/ReadOnlyMemoryContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,7 @@
<param name="context">Information about the transport (for example, the channel binding token). This parameter may be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes the multipart HTTP content to a stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content has been serialized to the stream object passed as the `stream` parameter.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SerializeToStreamAsync">
Expand Down
35 changes: 5 additions & 30 deletions xml/System.Net.Http/StreamContent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,9 @@ The <xref:System.Net.Http.StreamContent> object calls <xref:System.IO.Stream.Dis
</Parameters>
<Docs>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Writes the HTTP stream content to a memory stream.</summary>
<summary>Returns the HTTP stream as a read-only stream.</summary>
<returns>The HTTP content stream.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content has been written to the memory stream.
The <xref:System.Net.Http.StreamContent.CreateContentReadStream%2A> method buffers the content to a memory stream. Derived classes can override this behavior if there's a better way to retrieve the content as stream. For example, a byte array or a string could use a more efficient mechanism, such as wrapping a read-only <xref:System.IO.MemoryStream> around the bytes or string.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateContentReadStreamAsync">
Expand Down Expand Up @@ -192,18 +183,9 @@ This operation blocks until all of the content has been written to the memory st
</ReturnValue>
<Parameters />
<Docs>
<summary>Write the HTTP stream content to a memory stream as an asynchronous operation.</summary>
<summary>Returns the HTTP stream as a read-only stream as an asynchronous operation.</summary>
<returns>The task object representing the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after all of the content has been written to the memory stream.
The <xref:System.Net.Http.StreamContent.CreateContentReadStreamAsync%2A> method buffers the content to a memory stream. Derived classes can override this behavior if there is a better way to retrieve the content as stream. For example, a byte array or a string could use a more efficient method way such as wrapping a read-only <xref:System.IO.MemoryStream> around the bytes or string.)
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
Expand Down Expand Up @@ -277,14 +259,7 @@ This operation blocks until all of the content has been written to the memory st
<param name="context">Information about the transport (for example, the channel binding token). This parameter may be <see langword="null" />.</param>
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
<summary>Serializes the multipart HTTP content to a stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This operation blocks until all of the content has been serialized to the stream object passed as the `stream` parameter.
]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SerializeToStreamAsync">
Expand Down

0 comments on commit 1baf681

Please sign in to comment.