Sdílet prostřednictvím


HttpMultipartFormDataContent.Add Method

Definition

Overloads

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.

Add(IHttpContent)

Add HTTP content to the HttpMultipartFormDataContent instance.

public:
 virtual void Add(IHttpContent ^ content) = Add;
/// [Windows.Foundation.Metadata.Overload("Add")]
void Add(IHttpContent const& content);
[Windows.Foundation.Metadata.Overload("Add")]
public void Add(IHttpContent content);
function add(content)
Public Sub Add (content As IHttpContent)

Parameters

content
IHttpContent

The HTTP content to add to HttpMultipartFormDataContent.

Attributes

Remarks

Below are the exceptions that this function throws.

E_INVALIDARG

The content parameter is null (Nothing in Visual Basic).

See also

Applies to

Add(IHttpContent, String)

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

public:
 virtual void Add(IHttpContent ^ content, Platform::String ^ name) = Add;
/// [Windows.Foundation.Metadata.Overload("AddWithName")]
void Add(IHttpContent const& content, winrt::hstring const& name);
[Windows.Foundation.Metadata.Overload("AddWithName")]
public void Add(IHttpContent content, string name);
function add(content, name)
Public Sub Add (content As IHttpContent, name As String)

Parameters

content
IHttpContent

The HTTP content to add to HttpMultipartFormDataContent.

name
String

Platform::String

winrt::hstring

The name for the HTTP content to add to HttpMultipartFormDataContent.

Attributes

Remarks

Below are the exceptions that this function throws

E_INVALIDARG

The content parameter is null (Nothing in Visual Basic).

The name parameter is null (Nothing in Visual Basic).

See also

Applies to

Add(IHttpContent, String, String)

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

public:
 virtual void Add(IHttpContent ^ content, Platform::String ^ name, Platform::String ^ fileName) = Add;
/// [Windows.Foundation.Metadata.Overload("AddWithNameAndFileName")]
void Add(IHttpContent const& content, winrt::hstring const& name, winrt::hstring const& fileName);
[Windows.Foundation.Metadata.Overload("AddWithNameAndFileName")]
public void Add(IHttpContent content, string name, string fileName);
function add(content, name, fileName)
Public Sub Add (content As IHttpContent, name As String, fileName As String)

Parameters

content
IHttpContent

The HTTP content to add to HttpMultipartFormDataContent.

name
String

Platform::String

winrt::hstring

The name for the HTTP content to add to HttpMultipartFormDataContent.

fileName
String

Platform::String

winrt::hstring

The file name for the HTTP content to add to HttpMultipartFormDataContent.

Attributes

Remarks

Below are the exceptions that this function throws.

E_INVALIDARG

The content parameter is null (Nothing in Visual Basic).

The name parameter is null (Nothing in Visual Basic) or contains only white space characters.

The filename parameter is null (Nothing in Visual Basic) or contains only white space characters.

See also

Applies to