Re:The Ruby Stdlib is not a Ghetto
by catch23 on Thursday November 25, 2010 @12:10AM
(#1939422)
that's great if all you're trying to do is HTTP GET. standard libs are supposed to make all use cases fairly easy. making an http post isn't too bad:
[ Parent
| on HN ]
Re:The Ruby Stdlib is not a Ghetto
by petercooper on Thursday November 25, 2010 @03:33AM
(#1939730)
That's "not too bad" if you're coming from Java. Thankfully most other Ruby libraries have significantly less verbose APIs than this.
There's a much simpler way to do POSTs with Net::HTTP:
response = Net::HTTP.post_form(URI.parse("http://example.com"), {:param => "val"})
Re:The Ruby Stdlib is not a Ghetto
by aaronbrethorst on Thursday November 25, 2010 @04:20AM
(#1939802)
Personally, I'm a big fan of open-uri for super-simple requests and HTTParty for anything more complex.