Export (0) Print
Expand All

StreamContent Class

.NET Framework 4.6 and 4.5

Provides HTTP content based on a stream.

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

public class StreamContent : HttpContent

The StreamContent type exposes the following members.

  NameDescription
Public methodStreamContent(Stream)Creates a new instance of the StreamContent class.
Public methodStreamContent(Stream, Int32)Creates a new instance of the StreamContent class.
Top

  NameDescription
Public propertyHeadersGets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)
Top

  NameDescription
Public methodCopyToAsync(Stream)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter. (Inherited from HttpContent.)
Public methodCopyToAsync(Stream, TransportContext)Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter. (Inherited from HttpContent.)
Protected methodCreateContentReadStreamAsyncWrite the HTTP stream content to a memory stream as an asynchronous operation. (Overrides HttpContent.CreateContentReadStreamAsync().)
Public methodDispose()Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the StreamContent and optionally disposes of the managed resources. (Overrides HttpContent.Dispose(Boolean).)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLoadIntoBufferAsync()Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public methodLoadIntoBufferAsync(Int64)Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadAsByteArrayAsyncSerialize the HTTP content to a byte array as an asynchronous operation. (Inherited from HttpContent.)
Public methodReadAsStreamAsyncSerialize the HTTP content and return a stream that represents the content as an asynchronous operation. (Inherited from HttpContent.)
Public methodReadAsStringAsyncSerialize the HTTP content to a string as an asynchronous operation. (Inherited from HttpContent.)
Protected methodSerializeToStreamAsyncSerialize the HTTP content to a stream as an asynchronous operation. (Overrides HttpContent.SerializeToStreamAsync(Stream, TransportContext).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTryComputeLengthDetermines whether the stream content has a valid length in bytes. (Overrides HttpContent.TryComputeLength(Int64).)
Top

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1

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