<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,7 +7,6 @@ examples/rubyurl.rb
 examples/twitter.rb
 examples/whoismyrep.rb
 History
-httparty.gemspec
 lib/core_extensions.rb
 lib/httparty/exceptions.rb
 lib/httparty/request.rb</diff>
      <filename>Manifest</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,17 @@ Makes http fun again!
 
 See http://github.com/jnunemaker/httparty/tree/master/examples
 
+== COMMAND LINE INTERFACE
+
+httparty also includes the executable &lt;tt&gt;httparty&lt;/tt&gt; which can be
+used to query web services and examine the resulting output. By default
+it will output the response as a pretty-printed Ruby object (useful for
+grokking the structure of output). This can also be overridden to output
+formatted XML or JSON. Execute &lt;tt&gt;httparty --help&lt;/tt&gt; for all the
+options. Below is an example of how easy it is.
+
+  httparty &quot;http://twitter.com/statuses/public_timeline.json&quot; -f json
+
 == REQUIREMENTS:
 
 * JSON ~&gt; 1.1</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -80,18 +80,24 @@ module REXML
   end
 end
 
-response = HTTParty.send(opts[:action], ARGV.first, opts.merge(:format =&gt; :plain))
-
-if opts[:pretty_print]
-  pp response
+if opts[:pretty_print] || opts[:format].nil?
+  pp HTTParty.send(opts[:action], ARGV.first, opts)
 else
-  case opts[:format]
-  when :json
-    puts JSON.pretty_generate(JSON.parse(response))
-  when :xml
-    REXML::Document.new(response).write(STDOUT, 2)
-    puts
+  print_format = opts[:format]
+  opts.merge!(:format =&gt; :plain) if opts[:format]
+  response = HTTParty.send(opts[:action], ARGV.first, opts)
+
+  if print_format.nil?
+    pp response
   else
-    puts response
+    case print_format
+    when :json
+      puts JSON.pretty_generate(JSON.parse(response))
+    when :xml
+      REXML::Document.new(response).write(STDOUT, 2)
+      puts
+    else
+      puts response
+    end
   end
-end
+end
\ No newline at end of file</diff>
      <filename>bin/httparty</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>78f0c846d89ab53c3730b059aa75ae1ea53abb2b</id>
    </parent>
  </parents>
  <author>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </author>
  <url>http://github.com/jnunemaker/httparty/commit/dbb68d047de2e6e3218577063031e655d64a7adf</url>
  <id>dbb68d047de2e6e3218577063031e655d64a7adf</id>
  <committed-date>2009-01-04T23:03:37-08:00</committed-date>
  <authored-date>2009-01-04T22:58:08-08:00</authored-date>
  <message>Added readme info on CLI interface.

Ensured that CLI defaults to ruby pp.</message>
  <tree>32f765f5e11a9ebe858d262c20dc6d9252ea1bde</tree>
  <committer>
    <name>John Nunemaker</name>
    <email>nunemaker@gmail.com</email>
  </committer>
</commit>
