trumpet-trumpet 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/trumpet/request.rb +1 -5
- data/lib/trumpet.rb +1 -2
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/trumpet/request.rb
CHANGED
@@ -33,12 +33,8 @@ module Trumpet
|
|
33
33
|
def self.do_request(http_method, path, options)
|
34
34
|
raw_request = http_method.new(path)
|
35
35
|
raw_request.basic_auth(@@http_auth[:username], @@http_auth[:password]) unless @@http_auth.empty?
|
36
|
+
raw_request.body = options[:parameters].to_params if options[:parameters]
|
36
37
|
|
37
|
-
if http_method == Net::HTTP::Post
|
38
|
-
raw_request.set_form_data(options[:parameters]) if options[:parameters]
|
39
|
-
else
|
40
|
-
raw_request.body = options[:parameters].to_params if options[:parameters]
|
41
|
-
end
|
42
38
|
|
43
39
|
response = @@http.request(raw_request)
|
44
40
|
|
data/lib/trumpet.rb
CHANGED