mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-09 15:10:18 +00:00
Passing a handle of the invalid type (Ex. TCP) to _StatusCode should give error 52, but it gies error 9.
17 lines
338 B
QBasic
17 lines
338 B
QBasic
$Unstable:Http
|
|
$Console:Only
|
|
ON ERROR GOTO errorhand
|
|
|
|
' This domain isn't valid at all, an error is triggered
|
|
h& = _OpenClient("HTTP:NotARealURL")
|
|
Print h&
|
|
|
|
' Only HTTP URLs are supported, an error is triggered
|
|
h& = _OpenClient("HTTP:ftp://example.com")
|
|
Print h&
|
|
|
|
System
|
|
|
|
errorhand:
|
|
PRINT "Error:"; ERR; ", Line:"; _ERRORLINE
|
|
RESUME NEXT
|