Hey guys,
I am facing an issue in setting timeout. Below is my code.
IF (cou > 0) THEN
DECLARE
l_url VARCHAR2(256) ;
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_url := hostname;
l_http_request := UTL_HTTP.begin_request(l_url);
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.end_response(l_http_response);
IF l_http_response.status_code = 200 THEN
xxx_proc('OK','success',0,0);
ELSIF l_http_response.status_code in (401,403,500,503) THEN
xxx_proc('error' || to_char(l_http_response.status_code) || 'error',0,0);
ELSE
xxx_proc('timeout','ERROR',0,0);
END IF;
END IF;
Actually if the server is not active i should hit timeout. i guess there is a function set_transfer_timeout in UTL_HTTP package. i would like to set it using that function. please help.
Thanks