http://psoug.org/reference/utl_http.html
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_http.htm
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_http.htm
SQL> DECLARE
2 req utl_http.req;
3 resp utl_http.resp;
4 value VARCHAR2(1024);
5 v_url varchar2(1024);
6 text VARCHAR2(4000);
7 name VARCHAR2(1024);
8 value1 VARCHAR2(1024);
9 x PLS_INTEGER;
10 BEGIN
11 v_url :='http://192.168.110.120:8080/WebTest_1/mo.jsp?destnumber=1062012199@srcnumber=13858088526@content=556@timestamp=20090514154510';
12 req := utl_http.begin_request(replace(v_url,'@','&'));
13 utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
14 resp := utl_http.get_response(req);
15 utl_http.read_text(resp, text, 4000);
16 dbms_output.put_line('begin ');
17 dbms_output.put_line(text);
18 dbms_output.put_line('end ');
19 utl_http.get_transfer_timeout(x);
20 DBMS_OUTPUT.PUT_LINE('get_transfer_timeout: ' || x);
21 DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || resp.status_code);
22 DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || resp.reason_phrase);
23 FOR i IN 1..UTL_HTTP.GET_HEADER_COUNT(resp) LOOP
24 UTL_HTTP.GET_HEADER(resp, i, name, value1);
25 DBMS_OUTPUT.PUT_LINE(name || ':-:' || value1);
26 END LOOP;
27
28 LOOP
29 dbms_output.put_line('begin1 ');
30 utl_http.read_line(resp, value, TRUE);
31 dbms_output.put_line('end1 ');
32 dbms_output.put_line(value);
33 END LOOP;
34
35 utl_http.end_response(resp);
36 EXCEPTION
37 WHEN utl_http.end_of_body THEN
38 utl_http.end_response(resp);
39 END;
40 /
begin
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://192.168.110.120:8080/WebTest_1/">
<title>My JSP 'mo.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
<br/>
1062012199<br/>
13858088526<br/>
556<br/>
20090514154510<br/>
</body>
</html>
end
get_transfer_timeout: 60
HTTP response status code: 200
HTTP response reason phrase: OK
Server:-:Apache-Coyote/1.1
Content-Type:-:text/html;charset=GBK
Content-Length:-:864
Date:-:Thu, 12 May 2011 11:19:13 GMT
Connection:-:close
begin1
PL/SQL procedure successfully completed