# Hugs Hugs net-http-persistent with convenient get, delete, post, and put methods. Opted to write this gem for four reasons: * [Ganeti's API](http://docs.ganeti.org/ganeti/2.2/html/rapi.html), required the sending of a message body with the HTTP Get request, which [rest-client](https://github.com/archiloque/rest-client) does not do. * Wanted a [fast](http://blog.segment7.net/articles/2010/05/07/net-http-is-not-slow), thread-safe, and persistent client. * [Excon](https://github.com/geemus/excon) does most everything right, but is not compatible with [VCR](https://github.com/myronmarston/vcr) (more specifically [webmock](https://github.com/bblimke/webmock) and [fakeweb](https://github.com/chrisk/fakeweb)). * Wanted to learn how to handle this pattern. The XML usage of this gem will probably change. In the next couple of weeks Hugs will be implemented against an XML OCCI API. ## Assumptions * The webservice returns JSON or XML. * To objectify the returned JSON or hand back a Nokogiri::XML::Document. ## Usage ### Bundler gem "hugs" ### Examples See the 'Examples' section in the [wiki](http://github.com/retr0h/hugs/wiki/). ## Testing Tests can run offline thanks to [webmock](https://github.com/bblimke/webmock). $ bundle exec rake