Jump to content

HTTP: Difference between revisions

(added php perhaps)
Line 2:
 
Print a URL's content.
 
=={{header|Erlang}}==
-module(main).
-export([main/1]).
main([Url|[]]) ->
inets:start(),
case http:request(Url) of
{ok, {_V, _H, Body}} -> io:fwrite("~p~n",[Body]);
{error, Res} -> io:fwrite("~p~n", Res)
end.
 
Using it
|escript ./req.erl http://www.rosettacode.org
 
=={{header|Perl}}==
418

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.