UTL_HTTP Package
UTL_HTTP allows you to write PL/SQL programs that communicate with Web (HTTP) servers.

UTL_HTTP also contains a function that can be used in SQL queries. The package{ also supports HTTP over the Secured Socket Layer protocol (SSL), also known as HTTPS, directly or through an HTTP proxy. Other Internet-related data-access protocols (such as the File Transfer Protocol (FTP) or the Gopher protocol) are also supported using an HTTP proxy server that supports those protocols.

UTL_HTTP contains two similar entry points: REQUEST and REQUEST_PIECES. They each take a string universal resource locator (URL), contact that site, and return the data (typically HTML -- hyper-text markup language) obtained from that site. You should not expect REQUEST or REQUEST_PIECES to succeed in contacting a URL unless you can contact that URL by using a browser on the same machine (and with the same privileges, environment variables, etc.)

If REQUEST or REQUEST_PIECES fails (for example, if it raises an exception, or if it returns an HTML-formatted error message, yet you believe that the URL argument is correct), then try contacting that same URL with a browser, to verify network availability from your machine. Remember that you may have a proxy server set in your browser that needs to be set with each REQUEST or REQUEST_PIECES call using the optional proxy parameter.

UTL_HTTP.REQUEST : Returns up to the first 2000 bytes of the data retrieved from the given URL. This function can be used directly in SQL queries .

UTL_HTTP.REQUEST_PIECES : Returns a PL/SQL table of 2000-byte pieces of the data retrieved from the given URL

Session settings manipulate the configuration and default behavior of UTL_HTTP when HTTP requests are executed within a database user session. When a request is created, it inherits the default settings of the HTTP cookie support, follow-redirect, body character set, persistent-connection support, and transfer timeout of the current session. Those settings can be changed later by calling the request interface. When a response is created for a request, it inherits those settings from the request. Only the body character set can be changed later by calling the response interface.