com.HTTPRequest.getResponse
Waits and returns the response produced by one of request methods.
Syntax
getResponse()
RETURNS com.HTTPResponse
Usage
The getResponse() method wait for a response from the server and 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().
TRY/CATCH.Unlike getAsyncResponse(), the getResponse() method is
blocking: it stops the program flow until the HTTP response is received from the server.
Define a response timeout with the com.HTTPRequest.setTimeOut method.
setConnectionTimeOut()
and setTimeOut() methods.
If both timeouts are defined, the longest timeout will be used for the connection and read/write
operations.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)