145 lines
8.9 KiB
XML
145 lines
8.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Type Name="HttpMessageHandler" FullName="System.Net.Http.HttpMessageHandler">
|
|
<TypeSignature Language="C#" Value="public abstract class HttpMessageHandler : IDisposable" />
|
|
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit HttpMessageHandler extends System.Object implements class System.IDisposable" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>System.Net.Http</AssemblyName>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Base>
|
|
<BaseTypeName>System.Object</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
<Interface>
|
|
<InterfaceName>System.IDisposable</InterfaceName>
|
|
</Interface>
|
|
</Interfaces>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>There are various HTTP message handles that can be used. These include the following. </para>
|
|
<list type="ordered">
|
|
<item>
|
|
<para>
|
|
<see cref="T:System.Net.Http.DelegatingHandler" /> - A class used to plug a handler into a handler chain.</para>
|
|
</item>
|
|
<item>
|
|
<para>
|
|
<see cref="T:System.Net.Http.HttpMessageHandler" /> - A simple to class to derive from that supports the most common requirements for most applications.</para>
|
|
</item>
|
|
<item>
|
|
<para>
|
|
<see cref="T:System.Net.Http.HttpClientHandler" /> - A class that operates at the bottom of the handler chain that actually handles the HTTP transport operations.</para>
|
|
</item>
|
|
<item>
|
|
<para>
|
|
<see cref="T:System.Net.Http.WebRequestHandler" /> - A specialty class that operates at the bottom of the handler chain class that handles HTTP transport operations with options that are specific to the <see cref="T:System.Net.HttpWebRequest" /> object.</para>
|
|
</item>
|
|
</list>
|
|
<para>If developers derive classes from <see cref="T:System.Net.Http.HttpMessageHandler" /> and override the <see cref="M:System.Net.Http.HttpMessageHandler.SendAsync(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)" /> method, they must make sure that <see cref="M:System.Net.Http.HttpMessageHandler.SendAsync(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)" /> can get called concurrently by different threads.</para>
|
|
<para>This is necessary since methods on <see cref="T:System.Net.Http.HttpClient" /> can be called concurrently and need a guarantee of thread safety. So if a handler is assigned to an <see cref="T:System.Net.Http.HttpClient" /> instance, the <see cref="M:System.Net.Http.HttpMessageHandler.SendAsync(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)" /> method of the handler may get called concurrently by the <see cref="T:System.Net.Http.HttpClient" /> instance and needs to be thread safe.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>A base type for HTTP message handlers.</para>
|
|
</summary>
|
|
</Docs>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected HttpMessageHandler ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>To be added.</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.Net.Http.HttpMessageHandler" /> class.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Dispose">
|
|
<MemberSignature Language="C#" Value="public void Dispose ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>To be added.</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Releases the unmanaged resources and disposes of the managed resources used by the <see cref="T:System.Net.Http.HttpMessageHandler" />.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Dispose">
|
|
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="disposing" Type="System.Boolean" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This method is called by the public Dispose() method and the <see cref="M:System.Object.Finalize" /> method. Dispose() invokes the protected Dispose(Boolean) method with the <paramref name="disposing" /> parameter set to true. <see cref="M:System.Object.Finalize" /> invokes Dispose with <paramref name="disposing" /> set to false.When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.Net.Http.HttpMessageHandler" /> references. This method invokes the Dispose() method of each referenced object.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Releases the unmanaged resources used by the <see cref="T:System.Net.Http.HttpMessageHandler" /> and optionally disposes of the managed resources.</para>
|
|
</summary>
|
|
<param name="disposing">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to releases only unmanaged resources.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="SendAsync">
|
|
<MemberSignature Language="C#" Value="protected abstract System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class System.Net.Http.HttpResponseMessage> SendAsync(class System.Net.Http.HttpRequestMessage request, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage></ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="request" Type="System.Net.Http.HttpRequestMessage" />
|
|
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This operation will not block. The returned <see cref="T:System.Threading.Tasks.Task`1" /> object will complete once the entire response including content is read.</para>
|
|
<para>The <see cref="M:System.Net.Http.HttpMessageHandler.SendAsync(System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)" /> method is used primarily by the system. This method is called by the system one of the <see cref="M:System.Net.Http.HttpClient.SendAsync(System.Net.Http.HttpRequestMessage)" /> methods is called. Most apps will never call this method. </para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Send an HTTP request as an asynchronous operation.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Returns <see cref="T:System.Threading.Tasks.Task`1" />.</para>
|
|
<para>The task object representing the asynchronous operation.</para>
|
|
</returns>
|
|
<param name="request">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The HTTP request message to send.</param>
|
|
<param name="cancellationToken">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The cancellation token to cancel operation.</param>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |