<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>examples/rubyurl.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+== 0.1.6 2008-11-26
+* 1 major enhancement
+  * now passing :query to set_form_data if post request to avoid content length errors
+  
 == 0.1.5 2008-11-14
 * 2 major enhancements
   * Refactored send request method out into its own object.</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@ config/requirements.rb
 examples/aaws.rb
 examples/delicious.rb
 examples/google.rb
+examples/rubyurl.rb
 examples/twitter.rb
 examples/whoismyrep.rb
 httparty.gemspec</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -2,15 +2,15 @@
 
 Gem::Specification.new do |s|
   s.name = %q{httparty}
-  s.version = &quot;0.1.5&quot;
+  s.version = &quot;0.1.6&quot;
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;John Nunemaker&quot;]
-  s.date = %q{2008-11-14}
+  s.date = %q{2008-11-26}
   s.description = %q{Makes http fun! Also, makes consuming restful web services dead easy.}
   s.email = [&quot;nunemaker@gmail.com&quot;]
   s.extra_rdoc_files = [&quot;History.txt&quot;, &quot;License.txt&quot;, &quot;Manifest.txt&quot;, &quot;PostInstall.txt&quot;, &quot;README.txt&quot;]
-  s.files = [&quot;History.txt&quot;, &quot;License.txt&quot;, &quot;Manifest.txt&quot;, &quot;PostInstall.txt&quot;, &quot;README.txt&quot;, &quot;Rakefile&quot;, &quot;config/hoe.rb&quot;, &quot;config/requirements.rb&quot;, &quot;examples/aaws.rb&quot;, &quot;examples/delicious.rb&quot;, &quot;examples/google.rb&quot;, &quot;examples/twitter.rb&quot;, &quot;examples/whoismyrep.rb&quot;, &quot;httparty.gemspec&quot;, &quot;lib/httparty.rb&quot;, &quot;lib/httparty/request.rb&quot;, &quot;lib/httparty/version.rb&quot;, &quot;script/console&quot;, &quot;script/destroy&quot;, &quot;script/generate&quot;, &quot;script/txt2html&quot;, &quot;setup.rb&quot;, &quot;spec/httparty/request_spec.rb&quot;, &quot;spec/httparty_spec.rb&quot;, &quot;spec/spec.opts&quot;, &quot;spec/spec_helper.rb&quot;, &quot;tasks/deployment.rake&quot;, &quot;tasks/environment.rake&quot;, &quot;tasks/website.rake&quot;, &quot;website/css/common.css&quot;, &quot;website/index.html&quot;]
+  s.files = [&quot;History.txt&quot;, &quot;License.txt&quot;, &quot;Manifest.txt&quot;, &quot;PostInstall.txt&quot;, &quot;README.txt&quot;, &quot;Rakefile&quot;, &quot;config/hoe.rb&quot;, &quot;config/requirements.rb&quot;, &quot;examples/aaws.rb&quot;, &quot;examples/delicious.rb&quot;, &quot;examples/google.rb&quot;, &quot;examples/rubyurl.rb&quot;, &quot;examples/twitter.rb&quot;, &quot;examples/whoismyrep.rb&quot;, &quot;httparty.gemspec&quot;, &quot;lib/httparty.rb&quot;, &quot;lib/httparty/request.rb&quot;, &quot;lib/httparty/version.rb&quot;, &quot;script/console&quot;, &quot;script/destroy&quot;, &quot;script/generate&quot;, &quot;script/txt2html&quot;, &quot;setup.rb&quot;, &quot;spec/httparty/request_spec.rb&quot;, &quot;spec/httparty_spec.rb&quot;, &quot;spec/spec.opts&quot;, &quot;spec/spec_helper.rb&quot;, &quot;tasks/deployment.rake&quot;, &quot;tasks/environment.rake&quot;, &quot;tasks/website.rake&quot;, &quot;website/css/common.css&quot;, &quot;website/index.html&quot;]
   s.has_rdoc = true
   s.homepage = %q{http://httparty.rubyforge.org}
   s.post_install_message = %q{When you HTTParty, you must party hard!}</diff>
      <filename>httparty.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,8 @@ module HTTParty
       end
       
       def get_response(uri) #:nodoc:
-        request = http_method.new(uri.request_uri)
+        request = http_method.new(uri.request_uri)   
+        request.set_form_data(options[:query]) if post? &amp;&amp; options[:query]
         request.body = options[:body].is_a?(Hash) ? options[:body].to_query : options[:body] unless options[:body].blank?
         request.initialize_http_header options[:headers]
         request.basic_auth(options[:basic_auth][:username], options[:basic_auth][:password]) if options[:basic_auth]
@@ -99,6 +100,11 @@ module HTTParty
         raise ArgumentError, 'only get, post, put and delete methods are supported' unless SupportedHTTPMethods.include?(http_method)
         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)
+        raise ArgumentError, ':query must be hash if using HTTP Post' if post? &amp;&amp; !options[:query].nil? &amp;&amp; !options[:query].is_a?(Hash)
+      end
+      
+      def post?
+        Net::HTTP::Post == http_method
       end
   end
 end</diff>
      <filename>lib/httparty/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module HTTParty
   module VERSION #:nodoc:
     MAJOR = 0
     MINOR = 1
-    TINY  = 5
+    TINY  = 6
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>lib/httparty/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -105,3 +105,11 @@ describe HTTParty::Request do
     end
   end
 end
+
+describe HTTParty::Request, &quot;with POST http method&quot; do
+  it &quot;should raise argument error if query is not a hash&quot; do
+    lambda {
+      HTTParty::Request.new(Net::HTTP::Post, 'http://api.foo.com/v1', :format =&gt; :xml, :query =&gt; 'astring').perform
+    }.should raise_error(ArgumentError)
+  end
+end
\ No newline at end of file</diff>
      <filename>spec/httparty/request_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4c46223f4ec4845afbf017d1139866ac436a9b7</id>
    </parent>
  </parents>
  <author>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </author>
  <url>http://github.com/jnunemaker/httparty/commit/a517168278eaa55ee4ee973a08dc092acd86c267</url>
  <id>a517168278eaa55ee4ee973a08dc092acd86c267</id>
  <committed-date>2008-11-25T22:26:32-08:00</committed-date>
  <authored-date>2008-11-25T22:26:32-08:00</authored-date>
  <message>Fixed weird issue with content length when using net http post method. [#9 state:resolved]</message>
  <tree>a39495162479664bea8b4a62d0243f887af65d59</tree>
  <committer>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </committer>
</commit>
