| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
CURL.SetOptionInterface
This sets the interface name to use as outgoing network interface.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.SetOptionInterface"; curl; Value { ; Encoding } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl | |
| Value | Interface name. | en0 | |
| Encoding | The text encoding for text parameter. Default is UTF-8. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"utf8" | Optional |
Result
Returns "OK" on success.
Description
This sets the interface name to use as outgoing network interface.The name can be an interface name, an IP address, or a host name.
See also INTERFACE option in CURL manual.
Examples
Try with an explicit interface:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
# put in some URL
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "https://www.monkeybreadsoftware.com/filemaker/examples/test.txt") ]
# Request which interface to use
Set Variable [ $r ; Value: MBS("CURL.SetOptionInterface"; $curl; "en0") ]
# perform request
Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ]
# check result
Set Field [ CURL Test::Debug Messages ; Value: MBS("CURL.GetDebugMessages"; $curl) ]
Set Field [ CURL Test::Result ; Value: MBS("CURL.GetResultAsText"; $curl) ]
# cleanup
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
# put in some URL
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "https://www.monkeybreadsoftware.com/filemaker/examples/test.txt") ]
# Request which interface to use
Set Variable [ $r ; Value: MBS("CURL.SetOptionInterface"; $curl; "en0") ]
# perform request
Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ]
# check result
Set Field [ CURL Test::Debug Messages ; Value: MBS("CURL.GetDebugMessages"; $curl) ]
Set Field [ CURL Test::Result ; Value: MBS("CURL.GetResultAsText"; $curl) ]
# cleanup
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
See also
- CURL.GetDebugMessages
- CURL.GetOptionUserName
- CURL.New
- CURL.Perform
- CURL.Release
- CURL.SetOptionIPResolve
- CURL.SetOptionLocalPort
- CURL.SetOptionURL
- CURL.SetOptionUserName
- CURL.SetOptionVerbose
Blog Entries
Created 18th August 2014, last changed 24th February 2026