Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Sets input data for this transfer to be the text you provide.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
text | The text to send. | ||
Encoding | The text encoding for text parameter. Default is UTF-8 for version 10.0 or newer and native encoding before. Can also be "hex" or "base64" to provide data encoded with hex or base64 algorithm. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"UTF-8" | Optional |
Returns "OK" on success.
Set Text:
MBS("CURL.SetInputText"; $curl; "Hello World"; "utf8")
Set Text and disable Transfer Encodings and Expect header:
MBS("CURL.SetInputText"; $curl; "Hello World")
MBS("CURL.SetOptionHTTPHeader"; $curl; "Transfer-Encoding:"; "Expect:")
FTP Upload some text into a file on server:
Set Variable [$curl; Value:MBS("CURL.New")]
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "ftp://test.test/test/hello.txt")]
Set Variable [$result; Value:MBS("CURL.SetOptionUpload"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; CURL Test::Password)]
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; CURL Test::Name)]
Set Variable [$result; Value:MBS("CURL.SetInputText"; $curl; "This is content to upload")]
Set Variable [$result; Value:MBS("CURL.SetOptionVerbose"; $curl; 1)]
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Upload empty file with SFTP:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; "sftp://127.0.0.1/Users/cs/Desktop/test.txt" ) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUpload"; $curl; 1) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionPassword"; $curl; "secret") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUserName"; $curl; "cs") ]
Set Variable [ $result ; Value: MBS( "CURL.SetOptionSSHAuthTypes"; $curl; 2+8 ) ]
Set Variable [ $result ; Value: MBS("CURL.SetInputText"; $curl; "") ]
Set Field [ CURL Test::Result ; MBS("CURL.Perform"; $curl) ]
Set Field [ CURL Test::debug ; MBS("CURL.GetDebugMessages"; $curl) ]
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
Pass upload image as base64 encoded text:
MBS("CURL.SetInputText"; $curl; $ImageBase64; "base64")
Make a custom request sending some text:
Set Variable [$result; Value: MBS("CURL.SetOptionUpload"; $curl; 1)]
Set Variable [$result; Value: MBS("CURL.SetOptionCustomRequest"; $curl; "UPDATE")]
Set Variable [$result; Value: MBS("CURL.SetInputText"; $curl; $xml )]
Set Variable [$result; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml" )]
This function checks for a license.
Created 18th August 2014, last changed 31st January 2023
CURL.SetInputPNG - CURL.SetMultiOptionChunkLengthPenaltySize