Erlang HTTP Client: inets or ibrowse or ...?

3.3k views Asked by At

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.

3

There are 3 answers

2
YOUR ARGUMENT IS VALID On BEST ANSWER

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
Little Bobby Tables On

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.)

0
Michael Pippen Ntambazi On

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).