-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.cURLClient.Post
libcURL.cURLClient.Post
Function Post(URL As String, FormData As Dictionary, WriteTo As Writeable = Nil) As Boolean
Function Post(URL As String, PostFields() As String, WriteTo As Writeable = Nil) As Boolean
Function Post(URL As String, FormData As libcurl.MultipartForm, WriteTo As Writeable = Nil) As Boolean
Sub Post(URL As String, FormData As Dictionary, WriteTo As Writeable = Nil)
Sub Post(URL As String, PostFields() As String, WriteTo As Writeable = Nil)
Sub Post(URL As String, FormData As libcurl.MultipartForm, WriteTo As Writeable = Nil)| Name | Type | Comment |
|---|---|---|
| URL | String |
The RFC 3986 URI to which the form should be posted. |
| FormData | Dictionary |
An HTML form which will be encoded as multipart/form-data. |
| WriteTo | Writeable |
Optional. Downloaded data (if any) will be written to this object. If this parameter is Nil then use GetDownloadedData. |
| Name | Type | Comment |
|---|---|---|
| URL | String |
The RFC 3986 URI to which the form should be posted. |
| PostFields |
String array |
An HTML form which will be encoded as application/x-www-form-urlencoded. |
| WriteTo | Writeable |
Optional. Downloaded data (if any) will be written to this object. If this parameter is Nil then use GetDownloadedData. |
| Name | Type | Comment |
|---|---|---|
| URL | String |
The RFC 3986 URI to which the form should be posted. |
| FormData | MultipartForm | An HTML form which will be encoded as multipart/form-data. |
| WriteTo | Writeable |
Optional. Downloaded data (if any) will be written to this object. If this parameter is Nil then use GetDownloadedData. |
The synchronous versions of this method return True on success.
POST the passed HTML form via HTTP(S), using either multipart/form-data or application/x-www-form-urlencoded.
To encode the form using multipart/form-data, pass a Dictionary of NAME:VALUE pairs comprising HTML form elements: NAME is a string containing the form-element name; VALUE may be a string or a FolderItem. You may also specify a MultipartForm instance for advanced options.
To encode the form using application/x-www-form-urlencoded, pass an array of URL-encoded NAME=VALUE strings comprising HTML form elements.
If the URL parameter is empty ("") then the URL option is not modified (i.e. the previous URL is reused; if there is no previous URL then the transfer will fail with error code CURLE_URL_MALFORMAT(3).)
When using HTTP/1.1, libcURL will send a Expect: 100-Continue header and then wait briefly for the server to respond. This allows HTTP/1.1 servers to reject the operation before the (potentially large) form payload is transferred. Not all servers support this feature, and libcURL will continue normally if no intermediate reply comes from the server. You may disable this feature by deleting the Expect header.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-26 Andrew Lambert, offered under the CC BY-SA 3.0 License.