CURL.SetOptionTransferEncoding
------------------------------

Ask for HTTP Transfer Encoding.

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

MBS( "CURL.SetOptionTransferEncoding"; curl; Param ) 

**MBS**( **"CURL.SetOptionTransferEncoding";** /\* Ask for HTTP Transfer Encoding. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Param**) /\* The new setting.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Param | The new setting. | 1 |

### Result

Returns OK or error.

### Description

Ask for HTTP Transfer Encoding.  
Pass 1 to enable or 0 to disable.  
Adds a request for compressed Transfer Encoding in the outgoing HTTP request. If the server supports this and so desires, it can respond with the HTTP response sent using a compressed Transfer-Encoding that will be automatically uncompressed by libcurl on reception.  
Transfer-Encoding differs slightly from the Content-Encoding you ask for with [CURL.SetOptionAcceptEncoding](CURLSetOptionAcceptEncoding.md) in that a Transfer-Encoding is strictly meant to be for the transfer and thus MUST be decoded before the data arrives in the client. Traditionally, Transfer-Encoding has been much less used and supported by both HTTP clients and HTTP servers.  
See also [TRANSFER\_ENCODING](https://curl.haxx.se/libcurl/c/CURLOPT_TRANSFER_ENCODING.html) option in CURL manual.

### Examples

Enable transfer encoding:

 MBS ( "CURL.SetOptionTransferEncoding"; $curl ; 1 )  
### See also

- [CURL.SetOptionAcceptEncoding](CURLSetOptionAcceptEncoding.md)
- [CURL.SetOptionHTTPTransferDecoding](CURLSetOptionHTTPTransferDecoding.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 8th July 2015 , last changed 8th December 2016

  
[CURL.SetOptionTimeoutMS](CURLSetOptionTimeoutMS.md) - [CURL.SetOptionTransferText](CURLSetOptionTransferText.md)

[HTML Version](CURLSetOptionTransferEncoding.shtml)