HttpContent Class
A base class representing an HTTP entity body and content headers.
Inheritance Hierarchy
System.Object
System.Net.Http.HttpContent
System.Net.Http.ByteArrayContent
System.Net.Http.MultipartContent
System.Net.Http.StreamContent
Namespace: System.Net.Http
Assembly: System.Net.Http (in System.Net.Http.dll)
Syntax
'Declaration
Public MustInherit Class HttpContent _
Implements IDisposable
'Usage
Dim instance As HttpContent
public abstract class HttpContent : IDisposable
public ref class HttpContent abstract : IDisposable
[<AbstractClassAttribute>]
type HttpContent =
class
interface IDisposable
end
public abstract class HttpContent implements IDisposable
The HttpContent type exposes the following members.
Constructors
Name | Description | |
---|---|---|
HttpContent | Initializes a new instance of the HttpContent class. |
Top
Properties
Name | Description | |
---|---|---|
Headers | Gets the HTTP content headers as defined in RFC 2616. |
Top
Methods
Name | Description | |
---|---|---|
CopyToAsync(Stream) | Write the HTTP content to a stream as an asynchronous operation. | |
CopyToAsync(Stream, TransportContext) | Write the HTTP content to a stream as an asynchronous operation. | |
CreateContentReadStreamAsync | ||
Dispose() | Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. | |
Dispose(Boolean) | Releases the unmanaged resources used by the HttpContent and optionally disposes of the managed resources. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
LoadIntoBufferAsync() | Serialize the HTTP content to a memory buffer as an asynchronous operation. | |
LoadIntoBufferAsync(Int64) | ||
MemberwiseClone | (Inherited from Object.) | |
ReadAsByteArrayAsync | ||
ReadAsStreamAsync | ||
ReadAsStringAsync | ||
SerializeToStreamAsync | Serialize the HTTP content to a stream as an asynchronous operation. | |
ToString | (Inherited from Object.) | |
TryComputeLength | Determines whether the HTTP content has a valid length in bytes. |
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.