www.oradev.com
  Database   Sql   Functions   Packages   Performance   Books   Oracle   Other   About   XML   ORA-messages
  How to user utl_http

Packages

dbms_lob
dbms_output
How to use utl_http
Transform query to XML
Scheduling in 10g
dbms_profiler explained


  OraDev.com

utl_http package

With UTL_HTTP you can make HTTP requests directly from an Oracle database.
You can use this package if you want to read a webpage.
There are 2 functions to make a HTTP-request:
a) utl_http.request
This function returns 1 string with a maximum of 4000 characters.
example:
declare
    t_result
varchar2(4000);
begin
    t_result := utl_http.request('https://www.oradev.com/index.html');
    -- do somthing
end;

b) utl_http.request_lines
This function returns the page in pieces, and stores these in a pl/sql table.

example:
declare
    t_part
utl_http.html_pieces;
begin
    t_part := utl_http.request_lines('https://www.oradev.com/index.html');
    for i in 1 .. t_part.count loop
        -- proces t_part(i);
    end loop;
end;