What is the UTL_HTTP Oracle supplied package?
What is the UTL_HTTP Oracle supplied package?
Rating:
The UTL_HTTP Oracle supplied package allows a user to make HTTP requests directly from the database. The UTL_HTTP package makes HTTP callouts from SQL and PL/SQL. The UTL_HTTP package can be used to access data on the Internet or to call Oracle Web Server Cartridges. This package contains two entry point functions: REQUEST and REQUEST_PIECES. Both functions take a string URL (uniform resource locator) as a parameter, contact the site, and return the HTML data obtained from the site. The REQUEST function returns up to the first 2000 bytes of data retrieved from the given URL. The REQUEST_PIECES function returns a PL/SQL table of 2000-byte pieces of the data retrieved from the given URL.
If the HTTP call fails (such as when the URL is not properly specified in the HTTP syntax), the REQUEST_FAILED exception is raised. If an initialization of the HTTP-callout subsystem fails (for a reason such as a lack of available memory), the INIT_FAILED exception is raised. If there is no response from the specified URL, a formatted HTML error message may be returned. If a client user is behind a firewall, he needs to specify proxy as a parameter in addition to the URL.
Rating:
Other articles
- What is the USER_SOURCE data dictionary view?
- What is a row trigger?
- How is a SQL statement executed?
- What is the timestamp mode of remote dependency?
- What are the locations within a SQL statement from where user-defined functions can be called?