Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
29
Task/HTTP/M2000-Interpreter/http.m2000
Normal file
29
Task/HTTP/M2000-Interpreter/http.m2000
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Module CheckIt {
|
||||
Declare xml "Microsoft.XMLHTTP"
|
||||
const testUrl$ = "http://www.rosettacode.org"
|
||||
With xml, "readyState" as ReadyState
|
||||
Method xml "Open", "Get", testUrl$, True ' True means Async
|
||||
Method xml "send"
|
||||
\\ We set a thread to count time
|
||||
k=0
|
||||
Thread {
|
||||
k++
|
||||
} as TimeOut interval 100
|
||||
\\ In main thread we can check ReadyState and Mouse button
|
||||
Task.Main 100 {
|
||||
Print ReadyState
|
||||
If ReadyState=4 then exit
|
||||
if k>20 then exit ' 20*100= 2 sec
|
||||
if mouse then exit ' exit if mouse click
|
||||
}
|
||||
\\ So now we can read
|
||||
if ReadyState=4 then {
|
||||
With xml, "responseText" AS AA$
|
||||
\\ break AA$ to lines
|
||||
Document BB$=AA$
|
||||
\\ using line breaks as CRLF
|
||||
Report BB$
|
||||
}
|
||||
Declare xml Nothing
|
||||
}
|
||||
CheckIt
|
||||
Loading…
Add table
Add a link
Reference in a new issue