Compartir a través de


HttpContentMessageExtensions Class

Provides extension methods to read HttpRequestMessage and HttpResponseMessage entities from HttpContent instances.

Inheritance Hierarchy

System.Object
  System.Net.Http.HttpContentMessageExtensions

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class HttpContentMessageExtensions
'Usage
public static class HttpContentMessageExtensions
[ExtensionAttribute]
public ref class HttpContentMessageExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type HttpContentMessageExtensions =  class end
public final class HttpContentMessageExtensions

The HttpContentMessageExtensions type exposes the following members.

Methods

  Name Description
Public methodStatic member IsHttpRequestMessageContent Determines whether the specified content is HTTP request message content.
Public methodStatic member IsHttpResponseMessageContent Determines whether the specified content is HTTP response message content.
Public methodStatic member ReadAsHttpRequestMessageAsync(HttpContent) Reads the HttpContent as an HttpRequestMessage.
Public methodStatic member ReadAsHttpRequestMessageAsync(HttpContent, String) Reads the HttpContent as an HttpRequestMessage.
Public methodStatic member ReadAsHttpRequestMessageAsync(HttpContent, String, Int32) Reads the HttpContent as an HttpRequestMessage.
Public methodStatic member ReadAsHttpRequestMessageAsync(HttpContent, String, Int32, Int32) Reads the HttpContent as an HttpRequestMessage.
Public methodStatic member ReadAsHttpResponseMessageAsync(HttpContent) Reads the HttpContent as an HttpResponseMessage.
Public methodStatic member ReadAsHttpResponseMessageAsync(HttpContent, Int32) Reads the HttpContent as an HttpResponseMessage.
Public methodStatic member ReadAsHttpResponseMessageAsync(HttpContent, Int32, Int32) Reads the HttpContent as an HttpResponseMessage.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Net.Http Namespace