Erlang httprc:request抛出异常退出:{noproc,{gen_服务器,调用[httpc_管理器…]}

Erlang httprc:request抛出异常退出:{noproc,{gen_服务器,调用[httpc_管理器…]},erlang,httpc,Erlang,Httpc,我想在我的erlang程序中调用httprc:request,但我得到了一个异常,它对我没有任何信息,是什么出错了 这是我的代码: print_helloworld() -> Body = "userId=12345", httpc:request(post, { "'http://192.168.2.100:8080/010/xmppcontrol", [], "application/x-www-form-urlencoded", Bod

我想在我的erlang程序中调用httprc:request,但我得到了一个异常,它对我没有任何信息,是什么出错了

这是我的代码:

print_helloworld() ->
  Body = "userId=12345",
  httpc:request(post,
    {
    "'http://192.168.2.100:8080/010/xmppcontrol", [],
      "application/x-www-form-urlencoded",
      Body
    }, [], []).
这是我的例外:

1> hello_world:print_helloworld().
** exception exit: {noproc,
                    {gen_server,call,
                     [httpc_manager,
                      {request,
                       {request,undefined,<0.58.0>,0,'\'http',
                        {"192.168.2.100",8080},
                        "/010/xmppcontrol",[],post,
                        {http_request_h,undefined,"keep-alive",undefined,
                         undefined,undefined,undefined,undefined,undefined,
                         undefined,...},
                        {"application/x-www-form-urlencoded","userId=12345"},
                        {http_options,"HTTP/1.1",infinity,true,
                         {essl,[]},
                         undefined,false,infinity,...},
                        "'http://192.168.2.100:8080/010/xmppcontrol",[],none,
                        [],1510504662776,undefined,undefined,false}},
                      infinity]}}
     in function  gen_server:call/3 (gen_server.erl, line 214)
     in call from httpc:handle_request/9 (httpc.erl, line 554)

提前感谢。

错误消息说没有进程运行绑定到名称httpc_manager。如和中所述,您需要运行inets应用程序才能使httpc请求正常工作。您可以在src/…app.src中使用钢筋时将应用程序添加到应用程序列表中,或者手动启动iNet应用程序,例如

inets:start(),
httpc:request(...).

我没有收到任何错误,但是我的servlet没有执行,或者httpc调用的格式错误,无法到达servlet?在URL的开头还有一个额外的单引号。你能试着把它移开吗?哦,对不起,我没看到。现在它工作得很好。谢谢您:
inets:start(),
httpc:request(...).