我得到一個noproc
異常,當我嘗試調用httpc:request(get, ...)
在geturl/1
功能二郎異常錯誤:未定義功能lhttpc:啓動/ 0
** exception exit: {noproc,{gen_server,call,
[httpc_manager,
{request,{request,undefined,<0.54.0>,0,http,
爲了解決這個問題,我把在start
電話https://stackoverflow.com/a/14553219/58129
testurl() ->
ssl:start(),
lhttpc:start(),
geturl("http://www.cnn.com").
它失敗,此錯誤:
根據這個答案我so1:testurl().
** exception error: undefined function lhttpc:start/0
in function so1:testurl/0 (so1.erl, line 7)
我谷歌,我找不到一個模塊,被稱爲lhttpc
。什麼是使httpc:request
工作的正確方法?
lhttpc不是Erlang分佈的一部分,如果你想使用它,你需要從[https://github.com/esl/lhttpc下載](https://github.com/esl/lhttpc)並將其放入VM路徑中。 – Pascal 2014-08-29 07:12:13
@帕斯卡爾謝謝! – 2014-08-29 07:16:49