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 basic auth was not passing through correctly.
jnunemaker (author)
Tue Nov 11 15:05:58 -0800 2008
commit  c6867ca01de950bf2dbb9c606b5af9ca245ee6ab
tree    64d52a2e89f2f80d02f696f89ae51bf1a03529ac
parent  eb4a26bb874b3fd281e55a4396b43c1d5bab9d27
...
7
8
9
 
10
11
12
...
48
49
50
51
52
53
 
54
55
56
...
7
8
9
10
11
12
13
...
49
50
51
 
52
 
53
54
55
56
0
@@ -7,6 +7,7 @@ module HTTParty
0
     end
0
 
0
     attr_accessor :http_method, :path, :options
0
+    
0
     def initialize(http_method, path, options={})
0
       options = {:limit => 5}.merge(options)
0
       options[:limit] = 0 if options.delete(:no_follow)
0
@@ -48,9 +49,8 @@ module HTTParty
0
       
0
       request        = http_method.new(uri.request_uri)
0
       request.body   = options[:body].is_a?(Hash) ? options[:body].to_query : options[:body] unless options[:body].blank?
0
-      basic_auth     = options.delete(:basic_auth)
0
       request.initialize_http_header options[:headers]
0
-      request.basic_auth(basic_auth[:username], basic_auth[:password]) if options[:basic_auth]
0
+      request.basic_auth(options[:basic_auth][:username], options[:basic_auth][:password]) if options[:basic_auth]
0
       response       = http(uri).request(request)
0
       
0
       options[:format] ||= format_from_mimetype(response['content-type'])

Comments