Method HttpClient():setTimeout() Foundation

Sets communication timeouts.

Syntax
 
:setTimeout( [<nResolveTimeout>], [<nConnectTimeout>], [<nSendTimeout>], [<nReceiveTimeout>] ) --> self
Parameters
<nResolveTimeout>
A numeric value with the timeout value, in milliseconds, to be used for name resolution. If resolution takes longer, the request is canceled. The parameter is optional. It defaults to 0 milliseconds (wait forever).
<nConnectTimeout>
A numeric value with the timeout value, in milliseconds, to wait for the server connection to be established. If establishing the connection takes longer, the request is canceled. The parameter is optional. It defaults to 60000 milliseconds (60 seconds).
<nSendTimeout>
A numeric value with the timeout value, in milliseconds, to be used for sending requests. If sending a request takes longer, the send is canceled. The parameter is optional. It defaults to 30000 milliseconds (30 seconds).
<nReceiveTimeout>
A numeric value with the timeout value, in milliseconds, to wait for receiving a response to a request. If the response takes longer, the request is canceled. The parameter is optional. It defaults to 30000 milliseconds (30 seconds).
Return

:setTimeout() returns the object executing the method.

Description

The method :setTimeout() defines various timeouts to be used when sending requests and receiving resonses. The timeout values help control the time a send operation requires to complete in case something goes wrong.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.