Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
Net
/
HTTPResponse
/
//opt/alt/ruby27/share/ri/system/Net/HTTPResponse/read_body-i.ri
U:RDoc::AnyMethod[iI"read_body:ETI" Net::HTTPResponse#read_body;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"=Gets the entity body returned by the remote HTTP server.;To:RDoc::Markup::BlankLine o; ; [I"?If a block is given, the body is passed to the block, and ;TI"Ithe body is provided in fragments, as it is read in from the socket.;T@o; ; [I"GIf +dest+ argument is given, response is read into that variable, ;TI"Hwith <code>dest#<<</code> method (it could be String or IO, or any ;TI"1other object responding to <code><<</code>).;T@o; ; [I"BCalling this method a second or subsequent time for the same ;TI"<HTTPResponse object will return the value already read.;T@o:RDoc::Markup::Verbatim; [I",http.request_get('/index.html') {|res| ;TI" puts res.read_body ;TI"} ;TI" ;TI",http.request_get('/index.html') {|res| ;TI"/ p res.read_body.object_id # 538149362 ;TI"/ p res.read_body.object_id # 538149362 ;TI"} ;TI" ;TI"# using iterator ;TI",http.request_get('/index.html') {|res| ;TI"" res.read_body do |segment| ;TI" print segment ;TI" end ;TI"};T:@format0: @fileI"lib/net/http/response.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(dest = nil, &block);T@-FI"HTTPResponse;TcRDoc::NormalClass00