<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -27,4 +27,5 @@ end
 twitter = Twitter.new(config['email'], config['password'])
 pp twitter.timeline
 # pp twitter.timeline(:friends, :query =&gt; {:since_id =&gt; 868482746})
+# pp twitter.timeline(:friends, :query =&gt; 'since_id=868482746')
 # pp twitter.post('this is a test')
\ No newline at end of file</diff>
      <filename>examples/twitter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -90,29 +90,32 @@ module HTTParty
       
       # FIXME: this method is doing way to much and needs to be split up
       # options can be any or all of:
-      #   query       =&gt; hash of keys/values to be converted to query string
-      #   body        =&gt; string for raw post data
+      #   query       =&gt; hash of keys/values or a query string (foo=bar&amp;baz=poo)
+      #   body        =&gt; hash of keys/values or a query string (foo=bar&amp;baz=poo)
       #   headers     =&gt; hash of headers to send request with
       #   basic_auth  =&gt; :username and :password to use as basic http authentication (overrides @auth class instance variable)
       def send_request(method, path, options={})
         raise ArgumentError, 'only get, post, put and delete methods are supported' unless %w[get post put delete].include?(method.to_s)
-        raise ArgumentError, ':query must be a hash' if options[:query] &amp;&amp; !options[:query].is_a?(Hash)
         raise ArgumentError, ':headers must be a hash' if options[:headers] &amp;&amp; !options[:headers].is_a?(Hash)
         raise ArgumentError, ':basic_auth must be a hash' if options[:basic_auth] &amp;&amp; !options[:basic_auth].is_a?(Hash)
         # we always want path that begins with /
-        path         = path =~ /^(\/|https?:\/\/)/ ? path : &quot;/#{path}&quot;
-        @format    ||= format_from_path(path)
-        uri          = URI.parse(&quot;#{base_uri}#{path}&quot;)
-        current_qs   = uri.query ? &quot;#{uri.query}&amp;&quot; : ''
-        uri.query    = current_qs + default_params.merge(options[:query] || {}).to_query
-        klass        = Net::HTTP.const_get method.to_s.downcase.capitalize
-        request      = klass.new(uri.request_uri)
-        request.body = options[:body] unless options[:body].blank?
-        basic_auth   = options.delete(:basic_auth) || @auth
+        path           = path =~ /^(\/|https?:\/\/)/ ? path : &quot;/#{path}&quot;
+        @format      ||= format_from_path(path)
+        uri            = URI.parse(&quot;#{base_uri}#{path}&quot;)
+        existing_query = uri.query ? &quot;#{uri.query}&amp;&quot; : ''
+        uri.query      = if options[:query].blank?
+          existing_query
+        else
+          existing_query + (options[:query].is_a?(Hash) ? default_params.merge(options[:query]).to_query : options[:query])
+        end
+        klass          = Net::HTTP.const_get method.to_s.downcase.capitalize
+        request        = klass.new(uri.request_uri)
+        request.body   = options[:body].is_a?(Hash) ? options[:body].to_query : options[:body] unless options[:body].blank?
+        basic_auth     = options.delete(:basic_auth) || @auth
         request.initialize_http_header headers.merge(options[:headers] || {})
         # note to self: self, do not put basic auth above headers because it removes basic auth
         request.basic_auth(basic_auth[:username], basic_auth[:password]) if basic_auth
-        response     = http(uri).request(request)
+        response       = http(uri).request(request)
         parse_response(response.body)
       end
       </diff>
      <filename>lib/httparty.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,12 +130,6 @@ describe HTTParty do
       end.should raise_error(ArgumentError)
     end
     
-    it 'should require that :query is a hash if present' do
-      lambda do
-        Foo.send(:send_request, 'get', '/foo', :query =&gt; 'string')
-      end.should raise_error(ArgumentError)
-    end
-    
     it 'should require that :headers is a hash if present' do
       lambda do
         Foo.send(:send_request, 'get', '/foo', :headers =&gt; 'string')</diff>
      <filename>spec/httparty_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a8ad1da073c5ae61a2687a250cb17bc04f9c7c9</id>
    </parent>
  </parents>
  <author>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </author>
  <url>http://github.com/jnunemaker/httparty/commit/9b423a22c9ebcfefa93db3e668ead5e92dc0bfea</url>
  <id>9b423a22c9ebcfefa93db3e668ead5e92dc0bfea</id>
  <committed-date>2008-07-30T21:22:59-07:00</committed-date>
  <authored-date>2008-07-30T21:22:59-07:00</authored-date>
  <message>:body and :query now both take either a hash or a query string [#4 state:resolved]</message>
  <tree>c7f147b132670c1d8fa2ce7c66bf0d9dbcdfa77b</tree>
  <committer>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </committer>
</commit>
