CURL.SetOptionTimeOut
---------------------

Sets the maximum time in seconds that you allow the transfer operation to take.

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

MBS( "CURL.SetOptionTimeOut"; curl; Value ) 

**MBS**( **"CURL.SetOptionTimeOut";** /\* Sets the maximum time in seconds that you allow the transfer operation to take. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Timeout it seconds.e.g. 60 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Timeout it seconds. | 60 |

### Result

Returns "OK" on success.

### Description

Sets the maximum time in seconds that you allow the transfer operation to take.   
Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option will cause curl to use the SIGALRM to enable time-outing system calls.  
See also [TIMEOUT](https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html) option in CURL manual.

### Examples

Sets timeout to one minute:

 MBS ( "CURL.SetOptionTimeOut"; $curl ; 60 )  
Try whether google is available:

 Let ( \[  
\# new session   
curl = MBS ("[CURL.New](CURLNew.md)");  
\# only connect, don't transfer data   
r = MBS ("[CURL.SetOptionConnectOnly](CURLSetOptionConnectOnly.md)"; curl; 1);  
\# limit time to 1 second to connect and 2 seconds in total   
r = MBS ("[CURL.SetOptionConnectionTimeout](CURLSetOptionConnectionTimeout.md)"; curl; 1);  
r = MBS ("CURL.SetOptionTimeOut"; curl; 2);  
\# new connection please   
r = MBS ("[CURL.SetOptionFreshConnect](CURLSetOptionFreshConnect.md)"; curl; 1);  
r = MBS ("[CURL.SetOptionForbidReuse](CURLSetOptionForbidReuse.md)"; curl; 1);  
\# we query google here   
r = MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; curl; "http://www.google.de");  
\# and try it!   
result = MBS ("[CURL.Perform](CURLPerform.md)"; curl);  
\# optionally have log messages go there   
// $$log = MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; curl);  
\# and cleanup   
r = MBS ("[CURL.Release](CURLRelease.md)"; curl)  
\]; result )  
### See also

- [CURL.SetOptionForbidReuse](CURLSetOptionForbidReuse.md)
- [CURL.SetOptionHTTPAuth](CURLSetOptionHTTPAuth.md)
- [CURL.SetOptionMimeOptions](CURLSetOptionMimeOptions.md)
- [CURL.SetOptionPreQuote](CURLSetOptionPreQuote.md)
- [CURL.SetOptionReferer](CURLSetOptionReferer.md)
- [CURL.SetOptionServerResponseTimeout](CURLSetOptionServerResponseTimeout.md)
- [CURL.SetOptionSSLCert](CURLSetOptionSSLCert.md)
- [CURL.SetOptionTimeoutMS](CURLSetOptionTimeoutMS.md)
- [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)

### Example Databases

- [CURL/WebServices/DeepL](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/DeepL.shtml#1ScriptAnchor_)

### Blog Entries

- [Trigger Scripts via WebHook](https://www.mbsplugins.de/archive/2022-12-08/Trigger_Scripts_via_WebHook/monkeybreadsoftware_blog_filemaker)
- [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)
- [Using Apple's Global Service Exchange web service in FileMaker](https://www.mbsplugins.de/archive/2019-09-04/Using_Apples_Global_Service_Ex/monkeybreadsoftware_blog_filemaker)
- [Using Apple's Global Service Exchange web service in FileMaker](https://www.mbsplugins.de/archive/2017-02-21/Using_Apples_Global_Service_Ex/monkeybreadsoftware_blog_filemaker)
- [Translate PHP script with CURL to FileMaker Script](https://www.mbsplugins.de/archive/2014-07-24/Translate_PHP_script_with_CURL/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 1st December 2022

  
[CURL.SetOptionTimeCondition](CURLSetOptionTimeCondition.md) - [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md)

[HTML Version](CURLSetOptionTimeOut.shtml)