Skip to content

libcURL.MultipartForm.Operator_Convert

Andrew Lambert edited this page Nov 7, 2023 · 18 revisions

libcURL.MultipartForm.Operator_Convert

Method Signatures

 Sub Operator_Convert(FromDict As Dictionary)
 Function Operator_Convert() As Dictionary

Parameters

Name Type Comment
FromDict Dictionary An HTTP form encoded in a Dictionary.

Return value

An HTTP form encoded in a Dictionary.

Remarks

This method overloads the conversion operator(=), permitting implicit and explicit conversion to and from a Dictionary and a MultipartForm. The dictionary contains NAME:VALUE pairs comprising HTTP form elements: NAME is a string containing the form-element name; VALUE may be a string, FolderItem, or an object that implements the Readable interface.

Syntax example

 Dim Form As New Dictionary
 Form.Value("name") = "Bob"
 Form.Value("File") = SomeFolderItem
 Dim curlform As libcURL.MultipartForm = Form ' convert
' Using a paramarray of Pairs to construct a Dictionary which is then converted into a MultipartForm
Dim m As libcURL.MultipartForm = New Dictionary("name":"Bob", "File":SomeFolderItem)
Clone this wiki locally