Method HttpClient():wait() Foundation

Waits for completion of an asynschronous request.

Syntax
 
:wait( [nTimeOut] ) --> lCompleted
Parameters
<nTimeOut>
The optional numeric parameter <nTimeOut> specifies a timeout value in 1/100th of a second. :wait() returns if the request is not completed within this timeout interval. The default timeout value is 0, which causes the method to wait forever for the request to complete.
Return

:wait() returns the logical value true (.T.) if the request completes successfully within the specified timeout interval. Otherwise, the value false (.F.) is returned.

Description

The method :wait() pauses the current thread until an asynchronous request initiated via the :sendAsync() method completes, or until a specified timeout period expires, whichever comes first. Once :wait() returns true (.T.), the status of the operation is reflected in the HTTP status code returned by :getStatusCode(). If the request was handled successfully, the response sent by the server is accessible via the HTTP response object stored in the :HttpResponse member variable.

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.