Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-29266: end-of-body reached. (The end of the HTTP response body was reached.)

3198080Aug 26 2016 — edited Aug 26 2016

Hi all,

I'm trying to use the utl_http package to retrieve some of my information through a web service. In the code that I have written, I have looped the response as follows.

buffer varchar2(4000):

res := utl_http.get_response(req);

LOOP

utl_http.read_line(res, buffer);

END LOOP;

utl_http.end_response(res);

and the exception as follows,

EXCEPTION

     WHEN utl_http.end_of_body THEN

     utl_http.end_response(res);

I get the following error.

29266. 00000 -  "end-of-body reached"

*Cause:    The end of the HTTP response body was reached.

*Action:   If the end of the HTTP response is reached prematurely, check if

           the HTTP response terminates prematurely.  Otherwise, end the

           HTTP response.

Is there a way to handle this exception without being thrown? Like by getting the length of the request.

This post has been answered by AndrewSayer on Aug 26 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2016
Added on Aug 26 2016
4 comments
10,305 views