Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

HttpMessageContent Class

Derived HttpContent class which can encapsulate an HttpResponseMessage or an HttpRequestMessage as an entity with media type "application/http".

System.Object
  System.Net.Http.HttpContent
    System.Net.Http.HttpMessageContent

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
public class HttpMessageContent : HttpContent

The HttpMessageContent type exposes the following members.

  NameDescription
Public methodHttpMessageContent(HttpRequestMessage) Initializes a new instance of the HttpMessageContent class encapsulating an HttpRequestMessage.
Public methodHttpMessageContent(HttpResponseMessage) Initializes a new instance of the HttpMessageContent class encapsulating an HttpResponseMessage.
Top
  NameDescription
Public propertyHeadersGets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)
Public propertyHttpRequestMessage Gets the HTTP request message.
Public propertyHttpResponseMessage Gets the HTTP response message.
Top
  NameDescription
Public methodCopyToAsync(Stream)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public methodCopyToAsync(Stream, TransportContext)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodCreateContentReadStreamAsync (Inherited from HttpContent.)
Public methodDispose()Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected methodDispose(Boolean) Releases unmanaged and - optionally - managed resources (Overrides HttpContent.Dispose(Boolean).)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodLoadIntoBufferAsync()Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public methodLoadIntoBufferAsync(Int64) (Inherited from HttpContent.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadAsByteArrayAsync (Inherited from HttpContent.)
Public methodReadAsStreamAsync (Inherited from HttpContent.)
Public methodReadAsStringAsync (Inherited from HttpContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext)Serialize the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext) Asynchronously serializes the object's content to the given stream.
Public methodToString (Inherited from Object.)
Protected methodTryComputeLength Computes the length of the stream if possible. (Overrides HttpContent.TryComputeLength(Int64).)
Top
  NameDescription
Public Extension MethodIsFormDataDetermines whether the specified content is HTML form URL-encoded data. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodIsHttpRequestMessageContentDetermines whether the specified content is HTTP request message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsHttpResponseMessageContentDetermines whether the specified content is HTTP response message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsMimeMultipartContent()Overloaded. Determines whether the specified content is MIME multipart content. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodIsMimeMultipartContent(String)Overloaded. Determines whether the specified content is MIME multipart content with the specified subtype. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsAsync(Type)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>()Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>)Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger)Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsFormDataAsync()Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsFormDataAsync(CancellationToken)Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync()Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync()Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsMultipartAsync()Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync(CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, Int32)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, Int32, CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. (Defined by HttpContentMultipartExtensions.)
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.