HttpFormUrlEncodedContent Constructeur
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe HttpFormUrlEncodedContent avec le contenu spécifié.
public:
HttpFormUrlEncodedContent(IIterable<IKeyValuePair<Platform::String ^, Platform::String ^> ^> ^ content);
HttpFormUrlEncodedContent(IIterable<IKeyValuePair<winrt::hstring, winrt::hstring const&>> const& content);
public HttpFormUrlEncodedContent(IEnumerable<KeyValuePair<string,string>> content);
function HttpFormUrlEncodedContent(content)
Public Sub New (content As IEnumerable(Of KeyValuePair(Of String, String)))
Paramètres
- content
-
IIterable<IKeyValuePair<Platform::String,Platform::String>>
IIterable<IKeyValuePair<winrt::hstring,winrt::hstring>>
Contenu utilisé pour initialiser httpFormUrlEncodedContent.
Exemples
auto contentKeyValuePairs{
winrt::single_threaded_map<winrt::hstring, winrt::hstring>(std::map<winrt::hstring, winrt::hstring>{
{ L"firstname", L"Jane" }, { L"lastname", L"Austen" }
})
};
Windows::Web::Http::HttpFormUrlEncodedContent content1{ contentKeyValuePairs };
Windows::Web::Http::HttpFormUrlEncodedContent content2{
std::map<winrt::hstring, winrt::hstring>{
{ L"firstname", L"Jane" }, { L"lastname", L"Austen" }}
};
Remarques
Voici les exceptions levées par cette fonction.
E_INVALIDARG
Le paramètre content est null (Nothing en Visual Basic).
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour