SET serveroutput ON SIZE 40000
DECLARE
req utl_http.req;
resp utl_http.resp;
value VARCHAR2(1024);
BEGIN utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com'); req := utl_http.begin_request('http://www-hr.corp.my-company.com');
utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
resp := utl_http.get_response(req);
LOOP
utl_http.read_line(resp, value, TRUE);
dbms_output.put_line(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
DECLARE
req utl_http.req;
resp utl_http.resp;
value VARCHAR2(1024);
BEGIN utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com'); req := utl_http.begin_request('http://www-hr.corp.my-company.com');
utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
resp := utl_http.get_response(req);
LOOP
utl_http.read_line(resp, value, TRUE);
dbms_output.put_line(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
--------------------------------------------------------------------------------
<html><head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="REFRESH" content="1;URL=http://www.rcse.net">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>This
page
has
been
moved
to
www</title>
</head><body><p>This
page
has
been
moved
to
<a href="http://www.rcse.net">www.rcse.net</a></p></body></html>