HttpMultipartContent HttpMultipartContent HttpMultipartContent HttpMultipartContent HttpMultipartContent Class

Definition

Provides HTTP content that uses the multipart/* MIME type.

public : sealed class HttpMultipartContent : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent, IHttpMultipartContent
struct winrt::Windows::Web::Http::HttpMultipartContent : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent, IHttpMultipartContent
public sealed class HttpMultipartContent : IEnumerable<IHttpContent>, IDisposable, IStringable, IHttpContent, IHttpMultipartContent
Public NotInheritable Class HttpMultipartContent Implements IEnumerable<IHttpContent>, IDisposable, IStringable, IHttpContent, IHttpMultipartContent
var httpMultipartContent = new httpMultipartContent();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Enumerating the collection in C# or Microsoft Visual Basic

You can iterate through an HttpMultipartContent object in C# or Microsoft Visual Basic. In many cases, such as using foreach syntax, the compiler does this casting for you and you won't need to cast to IEnumerable<IHttpContent> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable with an IHttpContent constraint.

Constructors

HttpMultipartContent() HttpMultipartContent() HttpMultipartContent() HttpMultipartContent() HttpMultipartContent()

Initializes a new instance of the HttpMultipartContent class.

HttpMultipartContent(String) HttpMultipartContent(String) HttpMultipartContent(String) HttpMultipartContent(String) HttpMultipartContent(String)

Initializes a new instance of the HttpMultipartContent class with the specified MIME subtype.

HttpMultipartContent(String, String) HttpMultipartContent(String, String) HttpMultipartContent(String, String) HttpMultipartContent(String, String) HttpMultipartContent(String, String)

Initializes a new instance of the HttpMultipartContent class with the specified MIME subtype and boundary string.

Properties

Headers Headers Headers Headers Headers

Get a collection of content headers set on the HttpMultipartContent.

Methods

Add(IHttpContent) Add(IHttpContent) Add(IHttpContent) Add(IHttpContent) Add(IHttpContent)

Add HTTP content to the HttpMultipartContent instance.

BufferAllAsync() BufferAllAsync() BufferAllAsync() BufferAllAsync() BufferAllAsync()

Serialize the HttpMultipartContent into memory as an asynchronous operation.

Close() Close() Close() Close() Close()

Closes the HttpMultipartContent instance and releases allocated resources.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

First() First() First() First() First()

Gets an object that can be used to enumerate the contents in the HttpMultipartContent object.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync() ReadAsBufferAsync()

Serialize the HttpMultipartContent to a buffer as an asynchronous operation.

ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync() ReadAsInputStreamAsync()

Serialize the HttpMultipartContent and return an input stream that represents the content as an asynchronous operation.

ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync()

Serialize the HttpMultipartContent to a String as an asynchronous operation.

ToString() ToString() ToString() ToString() ToString()

Returns a string that represents the current HttpMultipartContent object.

TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64) TryComputeLength(UInt64)

Determines whether the HttpMultipartContent has a valid length in bytes.

WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream) WriteToStreamAsync(IOutputStream)

Write the HttpMultipartContent to an output stream as an asynchronous operation.

See Also