method
exec
v2_1_10 -
Show latest stable
- Class:
Net::HTTPGenericRequest
exec(sock, ver, path)public
write
# File lib/net/http/generic_request.rb, line 119
def exec(sock, ver, path) #:nodoc: internal use only
if @uri
if @uri.port == @uri.default_port
# [Bug #7650] Amazon ECS API and GFE/1.3 disallow extra default port number
self['host'] = @uri.host
else
self['host'] = "#{@uri.host}:#{@uri.port}"
end
end
if @body
send_request_with_body sock, ver, path, @body
elsif @body_stream
send_request_with_body_stream sock, ver, path, @body_stream
elsif @body_data
send_request_with_body_data sock, ver, path, @body_data
else
write_header sock, ver, path
end
end Related methods
- Instance methods
- []=
- body=
- body_exist?
- body_stream=
- exec
- inspect
- request_body_permitted?
- response_body_permitted?
- set_body_internal
- update_uri
- Class methods
- new
- Private methods
-
encode_multipart_form_data -
flush_buffer -
quote_string -
send_request_with_body -
send_request_with_body_data -
send_request_with_body_stream -
supply_default_content_type -
wait_for_continue -
write_header