[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Net::HTTP.get, obsolete 'dest' parameter?

Aslow)loris(with)

6/4/2005 8:00:00 PM

I noticed in the ruby 1.8 source for net/http.rb that the 'dest'
parameter to the 'get' method is supposed to be obsolete.

It seems like a convenient feature (e.g. the get_print method seems to
use 'dest'). So I am curious why this is so, anybody know?

Also, if it is truly obsolete, what is the proposed alternative when one
wants to get some large content chunk-by-chunk, instead of all-at-once?
(I realize one of my options is: h.get(uri) {|data| dest.write(data)},
but I wan't to be lazier). When something is obsoleted, it's nice to
point to the new way to do things.

Also, why isn't the 'post' method 'dest' argument similarly supposed
to be obsolete (there is no comment to that effect, anyhow)? If it is
still not obsolete, why the distinction between use of 'dest' in get
vs. post? If it is, should the comment be updated to reflect that?

Thanks.

-Loris
1 Answer

Minero Aoki

6/4/2005 8:36:00 PM

0