HTTP: Difference between revisions
Content added Content deleted
(added php perhaps) |
|||
Line 2: | Line 2: | ||
Print a URL's content. |
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}}== |
=={{header|Perl}}== |