Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/HTTP/Icon/http-1.icon
Normal file
19
Task/HTTP/Icon/http-1.icon
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
link cfunc
|
||||
procedure main(arglist)
|
||||
get(arglist[1])
|
||||
end
|
||||
|
||||
procedure get(url)
|
||||
local f, host, port, path
|
||||
url ? {
|
||||
="http://" | ="HTTP://"
|
||||
host := tab(upto(':/') | 0)
|
||||
if not (=":" & (port := integer(tab(upto('/'))))) then port := 80
|
||||
if pos(0) then path := "/" else path := tab(0)
|
||||
}
|
||||
write(host)
|
||||
write(path)
|
||||
f := tconnect(host, port) | stop("Unable to connect")
|
||||
writes(f, "GET ", path | "/" ," HTTP/1.0\r\n\r\n")
|
||||
while write(read(f))
|
||||
end
|
||||
1
Task/HTTP/Icon/http-2.icon
Normal file
1
Task/HTTP/Icon/http-2.icon
Normal file
|
|
@ -0,0 +1 @@
|
|||
|icon req.icn http://www.rosettacode.org
|
||||
Loading…
Add table
Add a link
Reference in a new issue