tags:

views:

54

answers:

1

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?

+3  A: 

http:request(get, {"http://127.0.0.1:8033/stats", [{"Accept", "text/plain"}]}, [], []).

klm