Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5    Statistic    FMM    Blog  


Set MIME option flags.

Component Version macOS Windows Linux Server iOS SDK
CURL 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionMimeOptions"; curl; value )   More


Parameter Description Example
curl The CURL session handle. $curl
value The new mime options.


Returns OK or error.


Set MIME option flags.
Pass a number that holds a bitmask of CURLMIMEOPT constants. Each bit is a Boolean flag used while encoding a MIME tree or multipart form data.

Available bits are:


Tells libcurl to escape multipart form field and file names using the backslash-escaping algorithm rather than percent-encoding (HTTP only).

Backslash-escaping consists in preceding backslashes and double quotes with a backslash. Percent encoding maps all occurrences of double quote, carriage return and line feed to %22, %0D and %0A respectively.

Before version 7.81.0, percent-encoding was never applied.

HTTP browsers used to do backslash-escaping in the past but have over time transitioned to use percent-encoding. This option allows to address server-side applications that have not yet have been converted.

As an example, consider field or file name strange\name"kind. When the containing multipart form is sent, this is normally transmitted as strange\name%22kind. When this option is set, it is sent as strange\\name\"kind.

See also MIME_OPTIONS option in CURL manual.

See also

Release notes

Blog Entries

Created 22nd August 2022, last changed 22nd August 2022

CURL.SetOptionMaxSendSpeed - CURL.SetOptionNETRCFile

Feedback: Report problem or ask question.

Start Chat