2008-07-28 10:49:53 -04:00
|
|
|
= httparty
|
2008-07-27 11:52:18 -04:00
|
|
|
|
|
|
|
== DESCRIPTION:
|
|
|
|
|
2008-07-28 13:20:03 -04:00
|
|
|
Makes http fun again!
|
2008-07-27 11:52:18 -04:00
|
|
|
|
2008-12-05 17:14:54 -05:00
|
|
|
== FEATURES:
|
2008-07-27 11:52:18 -04:00
|
|
|
|
2008-12-23 11:43:59 -05:00
|
|
|
* Easy get, post requests
|
2008-07-28 13:20:03 -04:00
|
|
|
* Basic http authentication
|
|
|
|
* Default request query string parameters (ie: for api keys that are needed on each request)
|
2008-08-22 21:57:38 -04:00
|
|
|
* Automatic parsing of JSON and XML into ruby hashes based on response content-type
|
2008-07-27 11:52:18 -04:00
|
|
|
|
2008-12-05 17:14:54 -05:00
|
|
|
== EXAMPLES:
|
2008-07-27 11:52:18 -04:00
|
|
|
|
2008-12-05 17:14:54 -05:00
|
|
|
See http://github.com/jnunemaker/httparty/tree/master/examples
|
2008-09-19 19:32:03 -04:00
|
|
|
|
2009-01-05 01:58:08 -05:00
|
|
|
== COMMAND LINE INTERFACE
|
|
|
|
|
|
|
|
httparty also includes the executable <tt>httparty</tt> 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 <tt>httparty --help</tt> for all the
|
|
|
|
options. Below is an example of how easy it is.
|
|
|
|
|
|
|
|
httparty "http://twitter.com/statuses/public_timeline.json" -f json
|
|
|
|
|
2008-07-27 11:52:18 -04:00
|
|
|
== REQUIREMENTS:
|
|
|
|
|
2008-12-23 11:43:59 -05:00
|
|
|
* JSON ~> 1.1
|
2008-07-27 11:52:18 -04:00
|
|
|
|
|
|
|
== INSTALL:
|
|
|
|
|
2008-07-28 13:20:03 -04:00
|
|
|
* sudo gem install httparty
|