[英]Erlang: HTTP Accept Header with Inets
I am trying to do the equivalent of the following curl command : 我正在尝试做以下等效curl命令:
curl -H "Accept: text/plain" http://127.0.0.1:8033/stats curl -H“接受:文本/纯文本” http://127.0.0.1:8033/stats
I tried with an Inets simple http request. 我尝试了一个Inets简单的http请求。 But, it isn't processed.
但是,它没有被处理。
How can I specify in Inets (or some other Erlang http client for that matter) the accept header requirement? 如何在Inets(或其他一些Erlang http客户端)中指定accept标头要求?
http:request(get,{“ http://127.0.0.1:8033/stats ”,[{“ Accept”,“ text / plain”}]},[],[])。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.