6

I am working with Erlang and need to make efficient HTTP requests.

What is the current "standard" HTTP Client for Erlang/OTP?

Is it inets or ibrowse or something else entirely?

Any advice or pointers appreciated.

Toby Hede
  • 36,755
  • 28
  • 133
  • 162

3 Answers3

7

We're using lhttpc, which works well for our use cases, but we haven't done extensive benchmarks of the alternatives. The "standard" is, of course, the one that ships with OTP (httpc from inets).

  • 2
    yeah, lhttpc is quite decent. We find it scalable on multicore. The best thing is, it is quite new and small - easy to trace, no memory leaks etc. I do not know ibrowse, but I am done with httpc. – user425720 Mar 06 '11 at 12:42
  • inets seems to have got quite a lot of love in recent versions of OTP and has support for a bunch of things not included in lttpc. – Toby Hede Mar 07 '11 at 23:32
0

Currently an FTP client and an HTTP client and server has been incorporated in Inets. Inets is just a webserver. Some of the Http clients in Inets are Inets Http(d) which is an implementation of Http 1.1.

i have used ibrowse before, it is an http 1.1 client. You can use ibrowse to make http requests. open your Erlang terminal and start ibrowse, but make sure u have the ibrowse folder in your Erlang lib folder on C:\Program Files\Erlang\lib. In your Erlang terminal type.

ibrowse:start(). then, make the http requests like. ibrowse:send_req("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=animal", [], get).

-1

If my memory serves, inets is the OTP built-in HTTP server, so it is more-or-less "standard". In practice, however, I don't think that it preferred over other HTTP servers (mochiweb, yaws, etc.)

Little Bobby Tables
  • 5,261
  • 2
  • 39
  • 49