September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
18
Task/HTTP/BaCon/http.bacon
Normal file
18
Task/HTTP/BaCon/http.bacon
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'
|
||||
' Read and display a website
|
||||
'
|
||||
SPLIT ARGUMENT$ BY " " TO arg$ SIZE dim
|
||||
IF dim < 2 THEN
|
||||
website$ = "www.basic-converter.org"
|
||||
ELSE
|
||||
website$ = arg$[1]
|
||||
ENDIF
|
||||
|
||||
OPEN CONCAT$(website$, ":80") FOR NETWORK AS mynet
|
||||
SEND CONCAT$("GET / HTTP/1.1\r\nHost: ", website$, "\r\n\r\n") TO mynet
|
||||
REPEAT
|
||||
RECEIVE dat$ FROM mynet
|
||||
total$ = total$ & dat$
|
||||
UNTIL ISFALSE(WAIT(mynet, 5000))
|
||||
CLOSE NETWORK mynet
|
||||
PRINT total$
|
||||
Loading…
Add table
Add a link
Reference in a new issue