HttpSettingsExtensions.

SetMultipartFormDataRequestBody(HttpSettings, IEnumerable<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, FilePath>>) Method

Summary

Sets the request body as form url encoded. Only valid for Http Methods that allow a request body. Any existing content in the RequestBody is overridden. Accepts multiple parameters with the same key. This can be used to post files to a remote URL
Assembly
Cake.Http.dll
Namespace
Cake.Http
Containing Type
HttpSettingsExtensions

Syntax

public static HttpSettings SetMultipartFormDataRequestBody(this HttpSettings settings, IEnumerable<KeyValuePair<string, string>> data, IEnumerable<KeyValuePair<string, FilePath>> filePaths)

Parameters

Name Type Description
settings HttpSettings The settings.
data IEnumerable<KeyValuePair<string, string>> Enumerable of KeyValuePair<TKey, TValue> of data to include in the post
filePaths IEnumerable<KeyValuePair<string, FilePath>> Enumerable of KeyValuePair<TKey, TValue> of file paths and associated names.

Return Value

Type Description
HttpSettings The same HttpSettings instance so that multiple calls can be chained.