Method: Net::HTTPGenericRequest#set_body_internal
- Defined in:
- lib/net/http/generic_request.rb
#set_body_internal(str) ⇒ Object
:nodoc: internal use only
186 187 188 189 190 191 192 |
# File 'lib/net/http/generic_request.rb', line 186 def set_body_internal(str) #:nodoc: internal use only raise ArgumentError, "both of body argument and HTTPRequest#body set" if str and (@body or @body_stream) self.body = str if str if @body.nil? && @body_stream.nil? && @body_data.nil? && request_body_permitted? self.body = '' end end |