HttpMultipartFormDataContent HttpMultipartFormDataContent HttpMultipartFormDataContent HttpMultipartFormDataContent HttpMultipartFormDataContent Class

Definition

Provides HTTP content that uses the multipart/form-data MIME type.

public : sealed class HttpMultipartFormDataContent : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent, IHttpMultipartFormDataContent
struct winrt::Windows::Web::Http::HttpMultipartFormDataContent : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent, IHttpMultipartFormDataContent
public sealed class HttpMultipartFormDataContent : IEnumerable<IHttpContent>, IDisposable, IStringable, IHttpContent, IHttpMultipartFormDataContent
Public NotInheritable Class HttpMultipartFormDataContent Implements IEnumerable<IHttpContent>, IDisposable, IStringable, IHttpContent, IHttpMultipartFormDataContent
var httpMultipartFormDataContent = new httpMultipartFormDataContent();
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 a HttpMultipartFormDataContent 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

HttpMultipartFormDataContent() HttpMultipartFormDataContent() HttpMultipartFormDataContent() HttpMultipartFormDataContent() HttpMultipartFormDataContent()

Initializes a new instance of the HttpMultipartFormDataContent class.

HttpMultipartFormDataContent(String) HttpMultipartFormDataContent(String) HttpMultipartFormDataContent(String) HttpMultipartFormDataContent(String) HttpMultipartFormDataContent(String)

Initializes a new instance of the HttpMultipartFormDataContent class with the specified boundary string.

Properties

Headers Headers Headers Headers Headers

Get a collection of content headers set on the HttpMultipartFormDataContent.

Methods

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

Add HTTP content to the HttpMultipartFormDataContent instance.

Add(IHttpContent, String) Add(IHttpContent, String) Add(IHttpContent, String) Add(IHttpContent, String) Add(IHttpContent, String)

Add HTTP content with a specified name to the HttpMultipartFormDataContent instance.

Add(IHttpContent, String, String) Add(IHttpContent, String, String) Add(IHttpContent, String, String) Add(IHttpContent, String, String) Add(IHttpContent, String, String)

Add HTTP content with a specified name from a file to the HttpMultipartFormDataContent instance.

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

Serialize the HttpMultipartFormDataContent into memory as an asynchronous operation.

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

Closes the HttpMultipartFormDataContent 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 HttpMultipartFormDataContent object.

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

Returns an enumerator that iterates through the collection.

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

Serialize the HttpMultipartFormDataContent to a buffer as an asynchronous operation.

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

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

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

Serialize the HttpMultipartFormDataContent to a String as an asynchronous operation.

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

Returns a string that represents the current HttpMultipartFormDataContent object.

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

Determines whether the HttpMultipartFormDataContent has a valid length in bytes.

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

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

See Also