Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/HTTPS/Erlang/https-1.erl
Normal file
10
Task/HTTPS/Erlang/https-1.erl
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-module(main).
|
||||
-export([main/1]).
|
||||
|
||||
main([Url|[]]) ->
|
||||
inets:start(),
|
||||
ssl:start(),
|
||||
case http:request(get, {URL, []}, [{ssl,[{verify,0}]}], []) of
|
||||
{ok, {_V, _H, Body}} -> io:fwrite("~p~n",[Body]);
|
||||
{error, Res} -> io:fwrite("~p~n", [Res])
|
||||
end.
|
||||
12
Task/HTTPS/Erlang/https-2.erl
Normal file
12
Task/HTTPS/Erlang/https-2.erl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-module(main).
|
||||
-export([main/1]).
|
||||
|
||||
main([Url|[]]) ->
|
||||
inets:start(),
|
||||
ssl:start(),
|
||||
http:request(get, {Url, [] }, [{ssl,[{verify,0}]}], [{sync, false}]),
|
||||
receive
|
||||
{http, {_ReqId, Res}} -> io:fwrite("~p~n",[Res]);
|
||||
_Any -> io:fwrite("Error: ~p~n",[_Any])
|
||||
after 10000 -> io:fwrite("Timed out.~n",[])
|
||||
end.
|
||||
1
Task/HTTPS/Erlang/https-3.erl
Normal file
1
Task/HTTPS/Erlang/https-3.erl
Normal file
|
|
@ -0,0 +1 @@
|
|||
|escript ./req.erl https://sourceforge.net/
|
||||
Loading…
Add table
Add a link
Reference in a new issue