com.HttpRequest.getAsyncResponse
When available, returns the response produced by one of request methods.
Syntax
getAsyncResponse()
RETURNS com.HttpResponse
Usage
If a response is available, the getAsyncResponse()
method returns a com.HttpResponse
object corresponding to
the response that was produced by a call to one of the request methods: doRequest()
, doTextRequest(), doXmlRequest()
, doFormEncodedRequest()
, or beginXmlRequest()
and endXmlRequest()
.
Unlike getResponse()
, the getAsyncResponse()
method is
non-blocking: it returns immediately and does not stop the program flow when waiting for a
response.
The method returns NULL
if the HTTP response was not yet received from the
server.
This method is typically called just after a do*Request()
call, and if the
returned value is NULL
, it is called again after a short period of time, to check
for a response. Within a dialog, use an ON IDLE
block to issue a
getAsyncRequest()
every seconds for example.
In case of error, the method throws an exception and sets the
status
variable. Depending on the error, a human-readable description of the
problem is available in the sqlca.sqlerrm
register. See Error handling in GWS calls (status).
The int_flag variable is checked during GWS API call to handle program interruptions, for more details, see Interruption handling in GWS calls (int_flag)