简体   繁体   中英

Erlang HTTP Client: inets or ibrowse or …?

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.

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM