mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 03:14:45 +00:00
be46dc870e
according to: https://discord.com/channels/975381912350752819/975389657212805160/1219440128150208534
19 lines
405 B
QBasic
19 lines
405 B
QBasic
$Unstable:Http
|
|
$Console:Only
|
|
ON ERROR GOTO errorhand
|
|
|
|
' This domain isn't valid at all, an error is triggered
|
|
h& = _OpenClient("https://thisisabaddomain")
|
|
Print h&
|
|
|
|
' This gives back a 404, but the connection is still successful in that
|
|
' situation.
|
|
h& = _OpenClient("https://qb64phoenix.com/fake")
|
|
Print h&
|
|
Print _StatusCode(h&)
|
|
|
|
System
|
|
|
|
errorhand:
|
|
PRINT "Error:"; ERR; ", Line:"; _ERRORLINE
|
|
RESUME NEXT
|