A
Aníbal
Hello,
I am using a code like:
# using block
File.open('result.txt', 'w') {|f|
resp, data = http.get('/~foo/') do |str|
f.write str
end
}
To read a chunked response from a server (a large file) Docs say:
"In version 1.2, this method never raises exception."
How can I know if the transfer was Ok? Just checking the size
reported by the content-length header against the size of the file
written to disk? Or is there any other recommended way?
Thanks in advance,
I am using a code like:
# using block
File.open('result.txt', 'w') {|f|
resp, data = http.get('/~foo/') do |str|
f.write str
end
}
To read a chunked response from a server (a large file) Docs say:
"In version 1.2, this method never raises exception."
How can I know if the transfer was Ok? Just checking the size
reported by the content-length header against the size of the file
written to disk? Or is there any other recommended way?
Thanks in advance,