Makes http fun again! Ain't no party like a httparty, because a httparty don't stop.
Install
gem install httparty
Requirements
Ruby 2.0.0 or higher
multi_xml
You like to party!
Examples
# Use the class methods to get down to business quicklyresponse=HTTParty.get('http://api.stackexchange.com/2.2/questions?site=stackoverflow')putsresponse.body,response.code,response.message,response.headers.inspect# Or wrap things up in your own classclassStackExchangeincludeHTTPartybase_uri'api.stackexchange.com'definitialize(service,page)@options={query: {site: service,page: page}}enddefquestionsself.class.get("/2.2/questions",@options)enddefusersself.class.get("/2.2/users",@options)endendstack_exchange=StackExchange.new("stackoverflow",1)putsstack_exchange.questionsputsstack_exchange.
I sort of like that the popular HTTP client for Ruby is called HTTP "Party"
jnunemaker / httparty
π Makes http fun again!
httparty
Makes http fun again! Ain't no party like a httparty, because a httparty don't stop.
Install
Requirements
Examples
I do think that enhances my enjoyment typing it compared to if it were "HTTPClient" or something generic or boring.