test2.erl
-module(test2).
-export([ttt/0]).
ttt()-> inets:start(), case httpc:request(“http://www.baidu.com”) of {ok,_Result}-> io:format(“hello ok”); {error,_Reason}-> io:format(“hello error”) end.
了解了用case来进行返回值不同的匹配。
注意 - 你可以用以下 HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
昵称
邮箱
网址
在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。
Δ
0 条评论。