Module: HTTMultiParty::ClassMethods
- Defined in:
- lib/httmultiparty.rb
Instance Method Summary collapse
Instance Method Details
#post(path, options = {}) ⇒ Object
98 99 100 101 102 103 104 105 106 |
# File 'lib/httmultiparty.rb', line 98 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
108 109 110 111 112 113 114 115 116 |
# File 'lib/httmultiparty.rb', line 108 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 |