public
Rubygem
Description: Makes http fun! Also, makes consuming restful web services dead easy.
Homepage:
Clone URL: git://github.com/jnunemaker/httparty.git
Click here to lend your support to: httparty and make a donation at www.pledgie.com !
Fixed that default_params weren't being added to query string if options[:query] 
was blank. [#6 state:resolved]
jnunemaker (author)
Sat Aug 09 10:17:36 -0700 2008
commit  a3f744b2bbb3c235b05bd9c2cd92fcf74bb6c3d8
tree    9386c5636cd83d77a560e41e767814a557a14cfa
parent  b3094fc1bbb9adc32d73957ec4bf4518c862777f
...
104
105
106
107
 
108
109
110
...
104
105
106
 
107
108
109
110
0
@@ -104,7 +104,7 @@ module HTTParty
0
         uri            = URI.parse("#{base_uri}#{path}")
0
         existing_query = uri.query ? "#{uri.query}&" : ''
0
         uri.query      = if options[:query].blank?
0
-          existing_query
0
+          existing_query + default_params.to_query
0
         else
0
           existing_query + (options[:query].is_a?(Hash) ? default_params.merge(options[:query]).to_query : options[:query])
0
         end

Comments