Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
UTL_HTTP , 44 of 59
This procedure reads the HTTP response body in text form until the end of line is reached and returns the output in the caller-supplied buffer. The end of line is as defined in the function read_line
of UTL_TCP. The end_of_body
exception will be raised if the end of the HTTP response body is reached. Text data is automatically converted from the response body character set to the database character set.
UTL_HTTP.read_line(r IN OUT NOCOPY resp, data OUT NOCOPY VARCHAR2, remove_crlf IN BOOLEAN DEFAULT FALSE);
Table 78-44 shows the parameters for the READ_LINE
procedure.
Parameter | Description |
---|---|
r (IN/OUT) |
The HTTP response. |
data (OUT) |
The HTTP response body in text form |
remove_crlf (IN) |
Removes the newline characters if set to |
The UTL_HTTP
package supports HTTP 1.1 chunked transfer-encoding. When the response body is returned in chunked transfer-encoding format as indicated in the response header, the package automatically decodes the chunks and returns the response body in de-chunked format.
If transfer timeout is set in the request of this response, read_line
waits for each data packet to be ready to read until timeout occurs. If it occurs, this procedure stops reading and returns all the data read successfully. If no data is read successfully, the transfer_timeout
exception is raised. The exception can be handled and the read operation can be retried later.
If a partial multi-byte character is found at the end of the response body, read_line
stops reading and returns all the complete multi-byte characters read successfully. If no complete character is read successfully, the partial_multibyte_char
exception is raised. The exception can be handled and the bytes of that partial multi-byte character can be read as binary by the read_raw
procedure. If a partial multi-byte character is seen in the middle of the response body because the remaining bytes of the character have not arrived and read timeout occurs, the transfer_timeout
exception is raised instead. The exception can be handled and the read operation can be retried later.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|