1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| The UTL_HTTP package makes Hypertext Transfer Protocol (HTTP) callouts
from SQL and PL/SQL. It can be used to access data on the Internet over
the HTTP protocol.
The package contains a set of API that enables users to write PL/SQL
programs that communicate with Web (HTTP) servers. It also contains a
function that can be used in SQL queries. Besides the HTTP protocol, it
also supports the HTTP protocol over the Secured Socket Layer protocol (SSL),
also known as HTTPS, directly or via a HTTP proxy. Other Internet-related
data-access protocols (such as the File Transfer Protocol (FTP) or
the Gopher protocol) are also supported via a HTTP proxy server that
supports those protocols.
When the package fetches data from a Web site using the HTTPS protocol,
it requires an Oracle wallet to be set up properly by Oracle Wallet Manager.
Non-HTTPS fetches do not require an Oracle wallet.
The API is divided into a number of categories. The session API manipulates
configurations pertaining to the package within a database user session.
The request API begins a new HTTP request, manipulates its attributes,
and sends information to the Web server. The response API returns the
attributes of the response and receives information the response data
from the Web server. The cookies API manipulates the HTTP cookies maintained
by the package within the database user session. The persistent connection
API manipulates the persistent connections maintained by the package. There
are also two simple functions that allow users to fetch a Web page by
a single function call. |
Partager