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?

Ted Karmel
  • 1,046
  • 1
  • 12
  • 20

1 Answers1

3

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

klm
  • 31
  • 1