I am consuming various XML-over-HTTP web services returning large XML files (> 2MB). What would be the fastest ruby http library to reduce the ‘downloading’ time?
Required features:
-
both GET and POST requests
-
gzip/deflate downloads (
Accept-Encoding: deflate, gzip) – very important
I am thinking between:
-
open-uri
-
Net::HTTP
-
curb
but you can also come with other suggestions.
P.S. To parse the response, I am using a pull parser from Nokogiri, so I don’t need an integrated solution like rest-client or hpricot.
http://github.com/pauldix/typhoeus
might be worth checking out. It’s designed for large and fast parallel downloads and is based on libcurl so it is pretty solid.
That said, test Net::HTTP and see if the performance is acceptable before doing something more complicated.