typhoeus 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/typhoeus.rb +1 -1
- data/lib/typhoeus/hydra.rb +1 -0
- data/lib/typhoeus/request.rb +5 -1
- metadata +1 -1
data/lib/typhoeus.rb
CHANGED
data/lib/typhoeus/hydra.rb
CHANGED
@@ -107,6 +107,7 @@ module Typhoeus
|
|
107
107
|
def get_easy_object(request)
|
108
108
|
easy = @easy_pool.pop || Easy.new
|
109
109
|
easy.url = request.url
|
110
|
+
easy.params = request.params if request.method == :post
|
110
111
|
easy.method = request.method
|
111
112
|
easy.headers = request.headers if request.headers
|
112
113
|
easy.request_body = request.body if request.body
|
data/lib/typhoeus/request.rb
CHANGED
@@ -11,7 +11,11 @@ module Typhoeus
|
|
11
11
|
@headers = options[:headers] || {}
|
12
12
|
@user_agent = options[:user_agent] || Typhoeus::USER_AGENT
|
13
13
|
@cache_timeout = options[:cache_timeout]
|
14
|
-
|
14
|
+
if @method == :post
|
15
|
+
@url = url
|
16
|
+
else
|
17
|
+
@url = @params ? "#{url}?#{params_string}" : url
|
18
|
+
end
|
15
19
|
@on_complete = nil
|
16
20
|
@after_complete = nil
|
17
21
|
@handled_response = nil
|