Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.Perform
Perform a file transfer.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Result
Error OK or error.
Description
Perform a file transfer.This function is called after the init and all the options are set, and will perform the transfer as described in the options. It must be called with the same handle as input as the CURL.New call returned.
You can do any amount of calls to CURL.Perform while using the same handle. If you intend to transfer more than one file, you are even encouraged to do so. CURL will then attempt to re-use the same connection for the following transfers, thus making the operations faster, less CPU intense and using less network resources. Just note that you will have to use the option functions between the invokes to set options for the following CURL.Perform.
You must never call this function simultaneously from two places using the same handle. Let the function return first before invoking it another time. If you want parallel transfers, you must use several curl handles.
While transfer is running, your FileMaker application is blocked. It's useful to show progress with using CURL.SetUpdateProgressDialog. Or you use CURL.PerformInBackground or CURL.PerformAsync to run the transfer in background.
Internal buffer for output, debug and header data is cleared before the perform.
This function returns error codes. If you get an error, please use CURL.GetDebugMessages to read the transcription of the transfer and look for error messages from server.
Typical error codes are 6 for a wrong domain name in the URL, 67 for wrong name/password combination, 60 for missing/bad SSL settings, 1 for an unsupported protocol.
In case of error 60, please decide what SSL policy you want and use our SSL options. e.g. use CURL.SetOptionSSLVerifyHost and CURL.SetOptionSSLVerifyPeer to disable SSL security or use CURL.SetOptionCAInfo to point CURL to a certificate.
No error means the data transfer was okay, but it doesn't tell you if for example a web server reported an error. Please check CURL.GetResponseCode for HTTP requests to get the HTTP status code. e.g. 404 if file is not found.
The list of possible error codes:
Name | Number | Description |
CURLE_OK | 0 | No error. |
CURLE_UNSUPPORTED_PROTOCOL | 1 | Unsupported protocol. |
CURLE_FAILED_INIT | 2 | Initialization failed or option not available. |
CURLE_URL_MALFORMAT | 3 | URL has wrong format. |
CURLE_COULDNT_RESOLVE_PROXY | 5 | DNS didn't return proxy IP. |
CURLE_COULDNT_RESOLVE_HOST | 6 | DNS didn't return IP for host. |
CURLE_COULDNT_CONNECT | 7 | Connection failed. |
CURLE_FTP_WEIRD_SERVER_REPLY | 8 | FTP error. |
CURLE_REMOTE_ACCESS_DENIED | 9 | A service was denied by the server due to lack of access when login fails this is not returned. |
CURLE_FTP_WEIRD_PASS_REPLY | 11 | FTP error. |
CURLE_FTP_WEIRD_PASV_REPLY | 13 | FTP error. |
CURLE_FTP_WEIRD_227_FORMAT | 14 | FTP error. |
CURLE_FTP_CANT_GET_HOST | 15 | FTP error. |
CURLE_FTP_COULDNT_SET_TYPE | 17 | FTP set command failed. |
CURLE_PARTIAL_FILE | 18 | Only a part of the file was downloaded. |
CURLE_FTP_COULDNT_RETR_FILE | 19 | File not found. |
CURLE_QUOTE_ERROR | 21 | quote command failure |
CURLE_HTTP_RETURNED_ERROR | 22 | HTTP returned an error. |
CURLE_WRITE_ERROR | 23 | Write error. |
CURLE_UPLOAD_FAILED | 25 | failed upload "command" |
CURLE_READ_ERROR | 26 | couldn't open/read from file |
CURLE_OUT_OF_MEMORY | 27 | Out Of memory |
CURLE_OPERATION_TIMEDOUT | 28 | the timeout time was reached |
CURLE_FTP_PORT_FAILED | 30 | FTP PORT operation failed |
CURLE_FTP_COULDNT_USE_REST | 31 | the REST command failed |
CURLE_RANGE_ERROR | 33 | RANGE "command" didn't work |
CURLE_HTTP_POST_ERROR | 34 | HTTP Post failed. |
CURLE_SSL_CONNECT_ERROR | 35 | wrong when connecting with SSL |
CURLE_BAD_DOWNLOAD_RESUME | 36 | couldn't resume download |
CURLE_FILE_COULDNT_READ_FILE | 37 | Failed to read file. |
CURLE_LDAP_CANNOT_BIND | 38 | LDAP can't connect. |
CURLE_LDAP_SEARCH_FAILED | 39 | LDAP Search failed. |
CURLE_FUNCTION_NOT_FOUND | 41 | Function not found. |
CURLE_ABORTED_BY_CALLBACK | 42 | Transfer aborted with CURL.Cancel. |
CURLE_BAD_FUNCTION_ARGUMENT | 43 | Bad parameters. |
CURLE_INTERFACE_FAILED | 45 | CURL.OptionInterface failed |
CURLE_TOO_MANY_REDIRECTS | 47 | catch endless re-direct loops |
CURLE_UNKNOWN_TELNET_OPTION | 48 | User specified an unknown option |
CURLE_TELNET_OPTION_SYNTAX | 49 | Malformed telnet option |
CURLE_PEER_FAILED_VERIFICATION | 51 | peer's certificate or fingerprint wasn't verified fine |
CURLE_GOT_NOTHING | 52 | when this is a specific error |
CURLE_SSL_ENGINE_NOTFOUND | 53 | SSL crypto engine not found |
CURLE_SSL_ENGINE_SETFAILED | 54 | can not set SSL crypto engine as default |
CURLE_SEND_ERROR | 55 | failed sending network data |
CURLE_RECV_ERROR | 56 | failure in receiving network data |
CURLE_SSL_CERTPROBLEM | 58 | problem with the local certificate |
CURLE_SSL_CIPHER | 59 | couldn't use specified cipher |
CURLE_SSL_CACERT | 60 | problem with the CA cert (path?) |
CURLE_BAD_CONTENT_ENCODING | 61 | Unrecognized transfer encoding |
CURLE_LDAP_INVALID_URL | 62 | Invalid LDAP URL |
CURLE_FILESIZE_EXCEEDED | 63 | Maximum file size exceeded |
CURLE_USE_SSL_FAILED | 64 | Requested FTP SSL level failed |
CURLE_SEND_FAIL_REWIND | 65 | Sending the data requires a rewind that failed |
CURLE_SSL_ENGINE_INITFAILED | 66 | failed to initialise ENGINE |
CURLE_LOGIN_DENIED | 67 | user, password or similar was not accepted and we failed to login |
CURLE_TFTP_NOTFOUND | 68 | file not found on server |
CURLE_TFTP_PERM | 69 | permission problem on server |
CURLE_REMOTE_DISK_FULL | 70 | out of disk space on server |
CURLE_TFTP_ILLEGAL | 71 | Illegal TFTP operation |
CURLE_TFTP_UNKNOWNID | 72 | Unknown transfer ID |
CURLE_REMOTE_FILE_EXISTS | 73 | File already exists |
CURLE_TFTP_NOSUCHUSER | 74 | No such user |
CURLE_CONV_FAILED | 75 | conversion failed |
CURLE_CONV_REQD | 76 | caller must register conversion callbacks |
CURLE_SSL_CACERT_BADFILE | 77 | could not load CACERT file, missing or wrong format |
CURLE_REMOTE_FILE_NOT_FOUND | 78 | remote file not found |
CURLE_SSH | 79 | error from the SSH layer, somewhat generic so the error message will be of interest when this has happened |
CURLE_SSL_SHUTDOWN_FAILED | 80 | Failed to shut down the SSL connection |
CURLE_AGAIN | 81 | socket is not ready for send/recv, wait till it's ready and try again. |
CURLE_SSL_CRL_BADFILE | 82 | could not load CRL file, missing or wrong format. |
CURLE_SSL_ISSUER_ERROR | 83 | Issuer check failed. |
CURLE_FTP_PRET_FAILED | 84 | a PRET command failed |
CURLE_RTSP_CSEQ_ERROR | 85 | mismatch of RTSP CSeq numbers |
CURLE_RTSP_SESSION_ERROR | 86 | mismatch of RTSP Session Identifiers |
CURLE_FTP_BAD_FILE_LIST | 87 | unable to parse FTP file list |
CURLE_CHUNK_FAILED | 88 | chunk callback reported error |
With SFTP, you can get logged error "Upload failed: Operation failed (4/-31)" when upload uses path to folder instead of file in URL.
Examples
Query a REST API:
# new session
Set Variable [$curl; MBS( "CURL.New" ) ] ]
# set URL for this REST API
Set Variable [$r; MBS("CURL.SetOptionURL"; $curl; "https://example.test/wc-api/v2/products") ]
# make a post with some data
Set Variable [$r; MBS("CURL.SetOptionPost"; $curl; 1) ]
Set Variable [$r; MBS("CURL.SetOptionPostFields"; $curl; "{product:{...}}"; "UTF-8") ]
# set credentials
Set Variable [$r; MBS("CURL.SetOptionUserName"; $curl; "consumer_key") ]
Set Variable [$r; MBS("CURL.SetOptionPassword"; $curl; "consumer_secret") ]
# add header option
Set Variable [$r; MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: application/json"; "Expect:" ) ]
# run it!
Set Variable [$Error; MBS( "CURL.Perform"; $curl ) ]
# check debug messages
Set Variable [$Messages; MBS("CURL.GetDebugMessages"; $curl) ]
# check result
Set Variable [$Output; MBS("CURL.GetResultAsText"; $curl) ]
# and cleanup
Set Variable [$r; MBS( "CURL.Release"; $curl ) ]
Run a generic POST request for REST or SOAP web service:
# new session
Set Variable [$curl; Value:MBS("CURL.New")]
# use stripe charge API
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "https://someURL/service")]
# set user name and password if needed:
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; "user name")]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; "password")]
# set some additional headers, which may include custom authorization and content types:
Set Variable [$result; Value:MBS( "CURL.SetOptionHTTPHeader"; $curl; "Authorization: Bearer a92eabb9-76f9-42ee-b280-bcd15cb2e9db"; "Content-Type: application/json" )
# make a post with given content:
Set Variable [$result; Value:MBS("CURL.SetOptionPostFields"; $curl; $json]
# perform
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
# now check result
Set Field [CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
Set Field [CURL Test::header; MBS("CURL.GetDebugMessages"; $curl)]
# cleanup
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Using Rosette web service:
# Start new CURL transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# Set options like Verbose Debug Messages
Set Variable [$result; Value:MBS("CURL.SetOptionVerbose"; $curl; 1)]
# the url of webservice
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "https://api.rosette.com/rest/v1/morphology/parts-of-speech")]
# the header info for tagging, API Key comes from a global field.
Set Variable [$result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "user_key: " & RosetteAPISettings::RosetteAPIKey; "Content-Type: application/json"; "Accept: application/json" )]
# We want a POST transfer:
Set Variable [$result; Value:MBS("CURL.SetOptionPost"; $curl; 1 )]
# Build JSON using the plugin function to properly encode a string:
Set Variable [$request; Value:"{\"content\": " & MBS("JSON.CreateString"; TextData::TextAsInput) & "}"]
Set Variable [$result; Value:MBS("CURL.SetOptionPostFields"; $curl; $request)]
#show our JSON in a field for debugging:
Set Field [TextData::CURLInput; $request]
#Run transfer
Set Variable [$result; Value:MBS("CURL.Perform"; $curl)]
# Check result and debug messages
Set Field [TextData::CurlDebug; MBS("CURL.GetDebugMessages"; $curl)]
Set Field [TextData::CurlOutput; MBS("CURL.GetResultAsText"; $curl)]
# Cleanup
Set Variable [$r; Value:MBS("CURL.Release"; $curl)]
Download a text from URL:
# start new transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# set URL
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "https://www.mbsplugins.eu/")]
# run transfer
Set Variable [$ErrorCode; Value:MBS("CURL.Perform"; $curl)]
# get result as text and debug messages:
Set Variable [$TextResult; Value:MBS( "CURL.GetResultAsText"; $curl)]
Set Variable [$DebugMessages; Value:MBS( "CURL.GetDebugMessages"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Release"; $curl)]
Charge with Stripe webservice:
# new session
Set Variable [$curl; Value:MBS("CURL.New")]
# use stripe charge API
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "https://api.stripe.com/v1/charges")]
# set user name
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; "sk_test_ your id here")]
# make a post with given content:
Set Variable [$result; Value:MBS("CURL.SetOptionPost"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionPostFields"; $curl; "amount=400¤cy=usd&description=Charge%20for%20test@example.com&source[object]=card&source[number]=4242424242424242&source[exp_month]=12&source[exp_year]=2017&source[cvc]=123")]
# perform
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
# now check result
Set Field [CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
Set Field [CURL Test::header; MBS("CURL.GetDebugMessages"; $curl)]
# cleanup
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Download URL to temp file:
Set Variable [$curl; Value:MBS("CURL.New")]
#this is URL to download
Set Variable [$url; Value:"https://www.monkeybreadsoftware.com/filemaker/test.txt"]
#get file name from URL
Set Variable [$name; Value:MBS( "Path.LastPathComponent"; $URL )]
#now make temp file path
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; MBS( "Folders.SystemTemporary" ); $name )]
#set URL to download
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; $url)]
#open destination file
Set Variable [$r; Value:MBS("CURL.CreateOutputFile"; $curl; $path)]
#run transfer
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
#close destination file
Set Variable [$r; Value:MBS("CURL.CloseOutputFile"; $curl)]
#get debug messages
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Query IP via ipinfo.io:
Go to Layout [“Table”]
New Record/Request
#Start new session
Set Variable [$curl; Value:MBS("CURL.New")]
#Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "http://ipinfo.io")]
#RUN now
Set Variable [$result; Value:MBS("CURL.Perform"; $curl)]
#Check result
Set Field [Table::DebugLog; MBS("CURL.GetDebugMessages"; $curl)]
Set Field [Table::Result; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
If [$result = "OK"]
#Check HTTP error code
Set Variable [$response; Value:MBS("CURL.GetResponseCode"; $curl)]
If [$response = 200]
#Query values from JSON
Set Variable [$json; Value:MBS( "JSON.Parse"; Table::Result )]
Set Field [Table::IP; MBS("JSON.GetPathItem"; $json; "ip"; 1)]
Set Field [Table::Hostname; MBS("JSON.GetPathItem"; $json; "hostname"; 1)]
Set Field [Table::City; MBS("JSON.GetPathItem"; $json; "city"; 1)]
Set Field [Table::Region; MBS("JSON.GetPathItem"; $json; "region"; 1)]
Set Field [Table::Country; MBS("JSON.GetPathItem"; $json; "country"; 1)]
Set Field [Table::Location; MBS("JSON.GetPathItem"; $json; "loc"; 1)]
Set Field [Table::Company or Provider; MBS("JSON.GetPathItem"; $json; "org"; 1)]
Set Variable [$r; Value:MBS( "JSON.Release"; $json )]
End If
End If
#Cleanup
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Commit Records/Requests [No dialog]
Query fedex for tracking status:
#Start new session
Set Variable [$curl; Value:MBS("CURL.New")]
#Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "https://www.fedex.com/trackingCal/track/v1/shipments/trackingnumbers")]
# set query content including the trackingNumber
Set Variable [$result; Value: MBS("CURL.SetOptionPostFields"; $curl; "{\"TrackPackagesRequest\":{\"appType\":\"WTRK\",\"appDeviceType\":\"WTRK\",\"uniqueKey\":\"\",\"processingParameters\":{},\"trackingInfoList\":[{\"trackNumberInfo\":{\"trackingNumber\":\"" & $trackingNumber & "\",\"trackingQualifier\":\"\",\"trackingCarrier\":\"\"}}]}}") ]
Set Variable [$result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: application/json")]
#RUN now
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
#Check result
Set Field [CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
#Cleanup
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Send request to Apple's gsx webservice:
Set Variable [$XMLRequest; Value:""]
#Start new session
Set Variable [$curl; Value:MBS("CURL.New")]
# URL for web service
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; "https://gsxapiut.apple.com:443/gsx-ws/services/emea/asp")]
# Mark content as XML
Set Variable [$result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml; charset=UTF-8")]
# Pass XML content for request
Set Variable [$result; Value:MBS("CURL.SetOptionPostFields"; $curl; $XMLRequest)]
# Certificate and private key in one file
Set Variable [$result; Value:MBS("CURL.SetOptionSSLCert"; $curl; "/Users/cs/Keys/apple-cert+key.pem")]
# Root certificates
Set Variable [$result; Value:MBS("CURL.SetOptionCAInfo"; $curl; "/Users/cs/Keys/cacert.pem")]
# SSL Key is in PEM Format
Set Variable [$result; Value:MBS("CURL.SetOptionSSLCertType"; $curl; "PEM")]
# Password for key file
Set Variable [$result; Value:MBS("CURL.SetOptionKeyPassword"; $curl; "xxx")]
# SSL Verification on
Set Variable [$result; Value:MBS("CURL.SetOptionSSLVerifyPeer"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionSSLVerifyHost"; $curl; 1)]
# use TLS v1.2
Set Variable [$result; Value:MBS("CURL.SetOptionSSLVersion"; $curl; 6)]
#RUN now
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
#Check result
Set Field [CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
Set Field [CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl)]
#Cleanup
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Upload file from OS X to IBM Mainframe:
Set Variable [$debug; Value:""]
Set Variable [$curl; Value:MBS("CURL.New")]
Set Variable [$result; Value:MBS("CURL.SetOptionUpload"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; "xxx")]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; "yyy")]
Set Variable [$result; Value:MBS( "CURL.OpenInputFile"; $curl; "/Users/gene/Desktop/MY.Logfile.txt")]
Set Variable [$result; Value:MBS( "CURL.SetOptionURL"; $curl; "ftp://192.168.1.4:21/MY.LOGFILE1" )]
Set Variable [$result; Value:MBS("CURL.SetOptionVerbose"; $curl; 1)]
Set Variable [$result; Value:MBS( "CURL.SetOptionTransferText"; $curl; 1 )]
Set Variable [$result; Value:MBS( "CURL.SetOptionSSLVerifyPeer"; $curl; 0 )]
Set Variable [$result; Value:MBS( "CURL.SetOptionSSLVerifyHost"; $curl; 0 )]
Set Variable [$result; Value:MBS( "CURL.SetOptionQuote"; $curl; "site RECFM=FB LRECL=1024")]
Set Variable [$result; Value:MBS("CURL.Perform"; $curl)]
Set Variable [$debug; Value:MBS("CURL.GetDebugMessages"; $curl)]
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
OAuth2 Token authentication with passing credentials via POST:
Set Variable [ $Curl ; Value: MBS("CURL.New") ]
#
# Change path to your CACert PEM File.
Set Variable [ $CacertPath ; Value: "C:\Users\Public\cacert.pem" ]
// Set Variable [ $Result ; Value: MBS( "CURL.SetOptionCAInfo"; $curl; $cacertPath ) ]
// Set Variable [ $Result ; Value: MBS( "CURL.SetOptionSSLVerifyHost"; $curl; 2 ) ]
// Set Variable [ $Result ; Value: MBS( "CURL.SetOptionSSLVerifyPeer"; $curl; 1 ) ]
Set Variable [ $Result ; Value: MBS("CURL.SetOptionVerbose"; $curl; 1) ]
#
# credentials
Set Variable [ $secret ; Value: "xxx" ]
Set Variable [ $client ; Value: "yyy" ]
Set Variable [ $domain ; Value: "zzz" ]
Set Variable [ $Result ; Value: MBS("CURL.SetOptionURL"; $curl; "https://" & $domain & "/auth/realms/demo/protocol/openid-connect/token") ]
#
# POST with form encoding
Set Variable [ $result ; Value: MBS("CURL.SetOptionHTTPHeader"; $curl; "content-type: application/x-www-form-urlencoded") ]
Set Variable [ $Result ; Value: MBS("CURL.SetOptionPostFields"; $curl; "grant_type=client_credentials&client_id="& $client & "&client_secret=" & $secret) ]
#
# run it
Set Variable [ $Result ; Value: MBS("CURL.Perform"; $curl) ]
Set Variable [ $DebugText ; Value: MBS("CURL.GetDebugMessages"; $curl) ]
Set Variable [ $ResultText ; Value: MBS("CURL.GetResultAsText"; $curl) ]
If [ $result = "OK" ]
# extract token
Set Variable [ $Token ; Value: JSONGetElement ( $ResultText; "access_token" ) ]
Set Field [ tbl_debugger::token ; $Token ]
End If
Set Field [ tbl_debugger::header ; $DebugText ]
Set Variable [ $Result ; Value: MBS("CURL.Release"; $curl) ]
Publish a topic for MQTT server in a Let statement:
Let([
// Send in file MQTT
curl = MBS("CURL.New");
// connect to MQTT server and send
r = MBS("CURL.SetOptionURL"; curl; MQTT::URL);
r = MBS("CURL.SetOptionPostFields"; curl; MQTT::Payload; "UTF-8");
//
r = MBS("CURL.SetOptionUserName"; curl; MQTT::Username);
r = MBS("CURL.SetOptionPassword"; curl; MQTT::Password);
//
// send request now
result = MBS("CURL.Perform"; curl);
//
// for checking error details
$$debugLog = MBS("CURL.GetDebugMessages"; curl; "UTF-8");
$$output = MBS("CURL.GetResultAsText"; curl; "UTF-8");
//
r = MBS("CURL.Release"; curl)]; result)
See also
- CURL.UseSystemCertificates
- CURL.WebSocketSend
- Folders.System
- Folders.SystemTemporary
- GMImage.Scale
- Hash.Digest
- JSON.Parse
- Path.LastPathComponent
- Plugin.SetFunctions
- SendMail.PrepareCURL
Release notes
- Version 11.4
- Added thread pool for Windows for multithreaded functions like CURL.PerformInBackground.
- Version 9.0
- Improved error message text for CURL.Perform calls.
Example Databases
- CURL/Amazon S3/Amazon S3 Upload File
- CURL/CURL Certificate Pinning
- CURL/CURL Check FileMaker Server
- CURL/CURL Download on Server
- CURL/CURL get and put/CURLS get and put
- CURL/Email/Email Client
- CURL/FTP/CURL FTP Upload File
- CURL/SFTP/CURL sFTP Upload
- CURL/WebServices/CURL FMS Admin API v17
- CURL/WebServices/Swiss Post Addresscheck V4-02-00
Blog Entries
- Adding ChatGPT to the ScriptWorkspace context menu
- MQTT in FileMaker
- MBS Plugin Advent calendar: 21 - SendMail
- Parallel network transfers with MBS Plugin
- How long do you wait for Insert From URL to finish?
- SFTP Upload with temporary file
- CURL Custom Function
- Trigger Scripts via WebHook
- SMTP with OAuth for Office 365 in FileMaker
- Sending email with a huge custom function
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 25th June 2024