inets

Erlang Web and Inets BindAddress

After installing Erlang Web 1.3 and starting it in interactive mode, I get the following error in the logs: Failed to start service: "config/inets.conf" due to: "httpd_conf: 0.0.0.0 is an invalid address" In my inets.conf I have the following: BindAddress 0.0.0.0 My sys.config: [{inets,[{services,[{httpd,"config/inets.con...

Erlang: how to embed inets:httpd ?

What is the proper way to embed the inets:httpd module inside an existing application? I would like an example / guidelines to achieving this, please. Updated: I want to be able to start an inets:httpd service dynamically from within an existing application. I do not want a solution which leverages a boot script as using this method do...

Erlang: when to perform `inets:start()` ?

What is the appropriate place for performing inets:start() ? in `applicationname_app' module? in applicationname_sup supervisor module? in a child process hanging from the supervisor?\ someplace else? (I am still struggling with inets:httpd) Note: the answer cannot be to the tune " use a boot file " , please. ...

Where does Nitrogen get the best performance - yaws, mochiweb, or inets?

The Nitrogen project web page declares equal support for yaws, mochiweb, and inets, but with which of these web servers is it going to perform the best? I.e. for a large scale application with mostly dynamic content with nitrogen + a web server which combination will be able to handle the most user load? ...

Handling Erlang inets http client errors

I have an Erlang app which makes a large number of http calls to external sites using inets, using the code below case http:request(get, {Url, []}, [{autoredirect, false}], []) of {ok, {{_, Code, _}, _, Body}}-> case Code of 200 -> HandlerFn(Body); _ -> {error, io:format("~s returned HTTP ~p", [Broker, Code])...

How do I do an HTTPS request with Erlang?

I tried the inets library but it timeouts. I don't think it supports https. I am trying to use ibrowse, but it isn't working. ...

Erlang: HTTP GET Parameters with Inets

The following post indicates how to make a simple get http request with Erlang's inets. exploring erlang's http client Sometimes, URLs have GET parameters: http://example.net/item?parameter1=12&parameter2=1431&parameter3=8765 Besides including the parameters in the URL itself, is there a way to create variables and then send ...

Erlang: HTTP Accept Header with Inets

I am trying to do the equivalent of the following curl command : curl -H "Accept: text/plain" http://127.0.0.1:8033/stats I tried with an Inets simple http request. But, it isn't processed. How can I specify in Inets (or some other Erlang http client for that matter) the accept header requirement? ...

Erlang HTTP: How do you include Body in an Inets or Ibrowse request?

I am currently using Inets with the following request:    http:request(put, {Url, [{"User-Agent", UA}, {"Content-type", "application/json"}]}, Bodytext, []), But the request fails. Any suggestions? ...