typhoeus 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ require 'typhoeus/request'
14
14
  require 'typhoeus/hydra'
15
15
 
16
16
  module Typhoeus
17
- VERSION = "0.1.7"
17
+ VERSION = "0.1.8"
18
18
 
19
19
  def self.easy_object_pool
20
20
  @easy_objects ||= []
@@ -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
@@ -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
- @url = @params ? "#{url}?#{params_string}" : url
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typhoeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix