Module: HTTMultiParty::ClassMethods
- Defined in:
- lib/httmultiparty.rb
Instance Method Summary collapse
Instance Method Details
#post(path, options = {}) ⇒ Object
117 118 119 120 121 122 123 124 125 |
# File 'lib/httmultiparty.rb', line 117 def post(path, ={}) method = Net::HTTP::Post [:body] ||= .delete(:query) if hash_contains_files?([:body]) method = MultipartPost [:query_string_normalizer] = HTTMultiParty.query_string_normalizer() end perform_request method, path, end |
#put(path, options = {}) ⇒ Object
127 128 129 130 131 132 133 134 135 |
# File 'lib/httmultiparty.rb', line 127 def put(path, ={}) method = Net::HTTP::Put [:body] ||= .delete(:query) if hash_contains_files?([:body]) method = MultipartPut [:query_string_normalizer] = HTTMultiParty.query_string_normalizer() end perform_request method, path, end |