End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Net::HTTPGenericRequest#send_request_with_body_stream
send_request_with_body_stream(sock, ver, path, f)
lib/net/http/generic_request.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/net/http/generic_request.rb, line 193
def send_request_with_body_stream(sock, ver, path, f)
unless content_length() or chunked?
raise ArgumentError,
"Content-Length not given and Transfer-Encoding is not `chunked'"
end
supply_default_content_type
write_header sock, ver, path
wait_for_continue sock, ver if sock.continue_timeout
if chunked?
chunker = Chunker.new(sock)
IO.copy_stream(f, chunker)
chunker.finish
else
IO.copy_stream(f, sock)
end
end
No documentation available
See also
#send_request_with_body_data
#supply_default_content_type
#send_request_with_body
#wait_for_continue
also in
3.4 · 3.3 · 3.2 · 3.0