Erlang HTTP Client: inets or ibrowse or ...?
Asked Answered
J

3

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.

Jacobsen answered 6/3, 2011 at 4:39 Comment(0)
L
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).

Liebfraumilch answered 6/3, 2011 at 7:57 Comment(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.Semifinal
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.Jacobsen
I
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).

Intraatomic answered 24/5, 2011 at 13:30 Comment(0)
P
-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.)

Patchy answered 6/3, 2011 at 7:16 Comment(2)
The question is about http requests, not responses, so servers are irrelevant.Liebfraumilch
It also specifically asked about inets, so no need for the downmarkCulbert

© 2022 - 2024 — McMap. All rights reserved.