erlang蜗牛学习中(一)

test1.erl

-module(test1).

-export([ttt/0]).

ttt()->
inets:start(),
R=httpc:request(“http://www.baidu.com”),
ttt(R).

ttt({ok,_Result})->
io:format(“hello ok”);
ttt({error,_Reason})->
io:format(“hello error”).

http client sample.

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 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>