Error while using lhttpc from erlang shell

怎甘沉沦 提交于 2019-12-11 15:02:02

问题


When I run following in erlang shell

lhttpc:request("http://www.google.co.uk", get, [], infinity).

I get this error

** exception exit: {noproc,{gen_server,call,
                                   [lhttpc_manager,
                                    {socket,<0.44.0>,"www.google.co.uk",80,false},
                                    infinity]}}

I'm a completely new to erlang and only thing I understand from the above is that some gen_server module has exited with some error. How do I fix this error?


回答1:


I found the answer on the erlang channel of freenode. I need to run following commands before issuing any requests

ssl:start().
lhttpc:start().


来源:https://stackoverflow.com/questions/14553112/error-while-using-lhttpc-from-erlang-shell

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!