curse_client icon indicating copy to clipboard operation
curse_client copied to clipboard

Update from Net::HTTP to a more robust HTTP library

Open elifoster opened this issue 8 years ago • 3 comments

You really shouldn't be using Net/HTTP for production applications. Here are many reasons why you should not use Net/HTTP:

  • single-threaded
  • poor connection design
    • opt-in to keep-alive
    • poor SSL support
  • does not support cookies
  • cannot follow redirects
  • It is one of the slowest HTTP clients for Ruby

I would recommend using one of the libcurl libraries, or one of the "original" ones (not built on top of Net/HTTP like most of the clients), such as curb, em-http-request, or the oldest and my personal favorite, httpclient.

Here's a nice slideshare to provide some statistical information regarding Ruby HTTP clients, made by Hiroshi Nakamura, Ruby developer and developer of HTTPClient: http://www.slideshare.net/HiroshiNakamura/rubyhttp-clients-comparison

elifoster avatar Mar 12 '16 21:03 elifoster

Good points. It should be updated to a more robust HTTP library. I'll take a look at your suggested options.

amcoder avatar Mar 13 '16 02:03 amcoder

It's been several months...any updates?

edwanvi avatar Oct 25 '16 20:10 edwanvi

@tkdberger Not right now. I haven't had much time to work on this recently and this is a low-priority change for me since the app is working at the moment.

amcoder avatar Oct 27 '16 18:10 amcoder