CURL.AddInputText
-----------------

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

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.7](newinversion27.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.AddInputText"; curl; Text { ; Encoding } ) 

**MBS**( **"CURL.AddInputText";** /\* Adds input data for this transfer to be the text you provide. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Text**; /\* The text to send. \*/   
**$Encoding**) /\* Optional; The text encoding.  
Default is UTF-8 for version 10.0 or newer and native encoding before.e.g. UTF8 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Text | The text to send. |  |  |
| Encoding | The text encoding.   Default is UTF-8 for version 10.0 or newer and native encoding before.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | UTF8 | Optional |

### Result

Returns "OK" on success.

### Description

Adds 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.  
Using SetInput\* functions and AddInput\* functions you can construct the input data in several function calls. This is useful if you do a multipart upload with text parts and file content mixed.  
  
This is for adding to existing data, but for uploading only a file, you can use [CURL.SetInputText](CURLSetInputText.md).  
### Examples

Add Text:

 MBS ("CURL.AddInputText"; $curl ; "Hello World"; "utf8")  
### See also

- [CURL.AddInputFile](CURLAddInputFile.md)
- [CURL.AddInputGIF](CURLAddInputGIF.md)
- [CURL.AddInputJPEG](CURLAddInputJPEG.md)
- [CURL.AddInputPDF](CURLAddInputPDF.md)
- [CURL.AddInputPNG](CURLAddInputPNG.md)
- [CURL.GetInputAsText](CURLGetInputAsText.md)
- [CURL.SetInputText](CURLSetInputText.md)

### Release notes

- **Version 10.5**
    - Fixed [CURL.AddInputFile](https://www.mbsplugins.eu/CURLAddInputFile.shtml), [CURL.AddInputGIF](https://www.mbsplugins.eu/CURLAddInputGIF.shtml), [CURL.AddInputJPEG](https://www.mbsplugins.eu/CURLAddInputJPEG.shtml), [CURL.AddInputPDF](https://www.mbsplugins.eu/CURLAddInputPDF.shtml), [CURL.AddInputPNG](https://www.mbsplugins.eu/CURLAddInputPNG.shtml) and [CURL.AddInputText](https://www.mbsplugins.eu/CURLAddInputText.shtml).
- **Version 10.0**
    - Changed default text encoding for [CURL.SetInputText](https://www.mbsplugins.eu/CURLSetInputText.shtml) and [CURL.AddInputText](https://www.mbsplugins.eu/CURLAddInputText.shtml) to UTF-8.

### Blog Entries

- [MBS FileMaker Plugin, version 10.5pr7](https://www.mbsplugins.de/archive/2020-11-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.1pr10](https://www.mbsplugins.de/archive/2013-02-03/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.7fc](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin 2.7 Release notes](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_27_Releas/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.7pr8](https://www.mbsplugins.de/archive/2012-05-03/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 6th December 2019

  
[CURL.AddInputPNG](CURLAddInputPNG.md) - [CURL.AddOptionHTTPHeader](CURLAddOptionHTTPHeader.md)

[HTML Version](CURLAddInputText.shtml)