Module: HTTMultiParty::ClassMethods
- Defined in:
- lib/httmultiparty.rb
Instance Method Summary collapse
Instance Method Details
#post(path, options = {}) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/httmultiparty.rb', line 43 def post(path, ={}) method = Net::HTTP::Post [:body] ||= .delete(:query) if query_contains_files?([:body]) method = MultipartPost [:query_string_normalizer] = HTTMultiParty::QUERY_STRING_NORMALIZER end perform_request method, path, end |
#put(path, options = {}) ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/httmultiparty.rb', line 53 def put(path, ={}) method = Net::HTTP::Put [:body] ||= .delete(:query) if query_contains_files?([:body]) method = MultipartPut [:query_string_normalizer] = HTTMultiParty::QUERY_STRING_NORMALIZER end perform_request method, path, end |