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.

HttpMultipartFormDataContent class

Applies to Windows and Windows Phone

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

Syntax


var httpMultipartFormDataContent = new Windows.Web.Http.HttpMultipartFormDataContent(string);
var httpMultipartFormDataContent = new Windows.Web.Http.HttpMultipartFormDataContent();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The HttpMultipartFormDataContent class has these types of members:

Constructors

The HttpMultipartFormDataContent class has these constructors.

ConstructorDescription
HttpMultipartFormDataContent() Initializes a new instance of the HttpMultipartFormDataContent class.
HttpMultipartFormDataContent(String) Initializes a new instance of the HttpMultipartFormDataContent class with the specified boundary string.

 

Methods

The HttpMultipartFormDataContent class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Add(IHttpContent) Add HTTP content to the HttpMultipartFormDataContent instance.
Add(IHttpContent, String) Add HTTP content with a specified name to the HttpMultipartFormDataContent instance.
Add(IHttpContent, String, String) Add HTTP content with a specified name from a file to the HttpMultipartFormDataContent instance.
BufferAllAsync Serialize the HttpMultipartFormDataContent into memory as an asynchronous operation.
Close [C++, JavaScript]Closes the HttpMultipartFormDataContent instance and releases allocated resources.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
First [C++, JavaScript]Gets an object that can be used to enumerate the contents in the HttpMultipartFormDataContent object.
ReadAsBufferAsync Serialize the HttpMultipartFormDataContent to a buffer as an asynchronous operation.
ReadAsInputStreamAsync Serialize the HttpMultipartFormDataContent and return an input stream that represents the content as an asynchronous operation.
ReadAsStringAsync Serialize the HttpMultipartFormDataContent to a String as an asynchronous operation.
ToString Returns a string that represents the current HttpMultipartFormDataContent object.
TryComputeLength Determines whether the HttpMultipartFormDataContent has a valid length in bytes.
WriteToStreamAsync Write the HttpMultipartFormDataContent to an output stream as an asynchronous operation.

 

Properties

The HttpMultipartFormDataContent class has these properties.

PropertyAccess typeDescription

Headers

Read-onlyGet a collection of content headers set on the HttpMultipartFormDataContent.

 

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<T> with an IHttpContent constraint.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http
Windows::Web::Http [C++]

Metadata

Windows.winmd

See also

IClosable
IHttpContent
IIterable(IHttpContent)
IStringable
Object

 

 

Show:
© 2014 Microsoft