Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/HTTP/Oz/http-1.oz
Normal file
10
Task/HTTP/Oz/http-1.oz
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
declare
|
||||
fun {GetPage Url}
|
||||
F = {New Open.file init(url:Url)}
|
||||
Contents = {F read(list:$ size:all)}
|
||||
in
|
||||
{F close}
|
||||
Contents
|
||||
end
|
||||
in
|
||||
{System.showInfo {GetPage "http://www.rosettacode.org"}}
|
||||
17
Task/HTTP/Oz/http-2.oz
Normal file
17
Task/HTTP/Oz/http-2.oz
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
declare
|
||||
[HTTPClient] = {Module.link ['x-ozlib://mesaros/net/HTTPClient.ozf']}
|
||||
|
||||
fun {GetPage Url}
|
||||
Client = {New HTTPClient.urlGET
|
||||
init(inPrms(toFile:false toStrm:true)
|
||||
httpReqPrms
|
||||
)}
|
||||
OutParams
|
||||
HttpResponseParams
|
||||
in
|
||||
{Client getService(Url ?OutParams ?HttpResponseParams)}
|
||||
{Client closeAll(true)}
|
||||
OutParams.sOut
|
||||
end
|
||||
in
|
||||
{System.showInfo {GetPage "http://www.rosettacode.org"}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue