U:RDoc::AnyMethod[iI" post:EFI"Net::HTTP#post;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HPosts +data+ (must be a String) to +path+. +header+ must be a Hash ;TI"%like { 'Accept' => '*/*', ... }.;To:RDoc::Markup::BlankLineo; ; [I"4This method returns a Net::HTTPResponse object.;T@o; ; [ I"9If called with a block, yields each fragment of the ;TI"8entity body in turn as a string as it is read from ;TI"@the socket. Note that in this case, the returned response ;TI"3object will *not* contain a (meaningful) body.;T@o; ; [I""+dest+ argument is obsolete. ;TI",It still works but you must not use it.;T@o; ; [I"(This method never raises exception.;T@o:RDoc::Markup::Verbatim; [ I"=response = http.post('/cgi-bin/search.rb', 'query=foo') ;TI" ;TI"# using block ;TI"'File.open('result.txt', 'w') {|f| ;TI"= http.post('/cgi-bin/search.rb', 'query=foo') do |str| ;TI" f.write str ;TI" end ;TI"} ;T: @format0o; ; [I"9You should set Content-Type: header field for POST. ;TI"7If no Content-Type: field given, this method uses ;TI"4"application/x-www-form-urlencoded" by default.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below00I"body_segment;F[I"/(path, data, initheader = nil, dest = nil);T@/FI" HTTP;TcRDoc::NormalClass00