Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


Sets input data for this transfer to be the text you provide.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes

MBS( "CURL.SetInputText"; Handle; text { ; Encoding } )


Parameter Description Example value
Handle The CURL session handle. $curl
text The text to send.
Encoding Optional
The text encoding for text parameter.
Default is native.
Possible encoding names: ANSI, Arabic-Mac, Arabic-Win, Baltic-Win, CentralEurope-Mac, ChineseSimp-Mac, ChineseSimp-Win, ChineseTrad-Mac, ChineseTrad-Win, Cyrillic-Mac, Cyrillic-Win, EasternEurope-Win, Greek-Mac, Greek-Win, Hebrew-Mac, Hebrew-Win, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-15, Korean-Johab, Korean-Mac, Korean-Win, Latin1, Mac, Native, ShiftJIS-Mac, ShiftJIS-Win, Turkish-Mac, Turkish-Win, UTF-8, DOS or Windows. Pass native to use the native encoding of the current platform.


Returns "OK" on success.


Sets input data for this transfer to be the text you provide.
Also sets input file length. You need to define input data for file uploads, http posts and http put operations.
Please make sure you choose the text encoding the other side expects.
To avoid chunked transfer to server, you can also use CURL.SetOptionPostFields instead for text input.
If you set CURL.SetOptionHTTPHeader with Transfer-Encoding and/or Expect, you can disable chunked transfer.

For HTTP POST, please use CURL.SetOptionPost with 1 and CURL.SetOptionPostFields with your POST content using web services and other things.


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.GetDebugAsText"; $curl)]
Set Variable [$result; Value:MBS("CURL.Cleanup"; $curl)]

See also

Example Databases

CURL.SetInputPNG   -   CURL.SetOptionAddressScope

Feedback: Report problem or ask question.

MBS FileMaker blog