Mac OS X
Components Crossplatform Mac & Win Server Client Old Guides Examples
New in version: 7.5 8.0 8.1 8.2 8.3 8.4 8.5 9.0 9.1 9.2 Statistic
Sets a custom request.
|Component||Version||macOS||Windows||Server||FileMaker Cloud||FileMaker iOS SDK|
|curl||The CURL session handle.||$curl|
|Value||The custom request string.||"PUT"|
The text encoding for text parameter.
Default is UTF-8.
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.
DescriptionSets a custom request.
Pass a text string as parameter. It will be used instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST when doing a FTP directory listing. This is useful for doing DELETE or other more or less obscure HTTP requests. Don't do this at will, make sure your server supports the command first.
When you change the request method by setting CURL.SetOptionCustomRequest to something, you don't actually change how libcurl behaves or acts in regards to the particular request method, it will only change the actual string sent in the request.
For example: if you tell libcurl to do a HEAD request, but then change the request to a "GET" with CURL.SetOptionCustomRequest you'll still see libcurl act as if it sent a HEAD even when it does send a GET.
To switch to a proper HEAD, use CURL.SetOptionNoBody, to switch to a proper POST, use CURL.SetOptionPost and CURL.SetOptionPostFields.
Restore to the internal default by setting this to "".
Many people have wrongly used this option to replace the entire request with their own, including multiple headers and POST contents. While that might work in many cases, it will cause libcurl to send invalid requests and it could possibly confuse the remote server badly. Use CURL.SetOptionPost and CURL.SetOptionPostFields to set POST data. Use CURL.SetOptionHTTPHeader to replace or extend the set of headers sent by libcurl. Use CURL.SetOptionHTTPVersion to change HTTP version.
See also CUSTOMREQUEST option in CURL manual.
Sets request POST:
Advanced file listing for FTP:
Set delete request:
Fetch email flags for IMAP:
Sets custom request PATCH:
IMAP fetch all email list with MessageID included:
Mark email to be deleted via IMAP:
Delete emails via IMAP:
Delete email via POP3:
Set deleted flag for email with IMAP:
Query POP3 capabilities with UIDL request:
Query headers of first email via POP3:
IMAP Email moving.
Create folder via WebDAV:
- CURL/FTP/CURL FTP Directory Listing
- CURL/WebServices/Twitter oAuth
- CURL/Amazon S3 Upload File
- CURL/CURL FMS Admin API
- CURL/Email/Email Client IMAP Optimized
- CURL/Email/IMAP Email
- CURL/Email/IMAP Email List
- CURL/Email/old examples/Email Client IMAP Optimized
- CURL/Email/Email Client
- CURL/Email/Email Client IMAP
Created 18th August 2014, last changed 27th December 2018
Feedback: Report problem or ask question.
MBS Xojo blog