【发布时间】:2017-08-04 15:01:58
【问题描述】:
我目前正在使用带有以下请求的 Inets:
http:request(put, {Url, [{"User-Agent", UA}, {"Content-type",
"application/json"}]}, Bodytext, []),
但是请求失败。
有什么建议吗?
【问题讨论】:
-
你打电话给
inets:start().了吗?
我目前正在使用带有以下请求的 Inets:
http:request(put, {Url, [{"User-Agent", UA}, {"Content-type",
"application/json"}]}, Bodytext, []),
但是请求失败。
有什么建议吗?
【问题讨论】:
inets:start().了吗?
ibrowse:start().
ibrowse:send_req(Url, Headers, put, Body).
或
ibrowse:send_req(Url, Headers, put, Body, Options).
【讨论】:
试试这个:http:request(put, {Url, [{"User-Agent", UA}], "application/json", Bodytext}, [], [])
【讨论】: