http.checkURL
Determine whether a URL is valid and is whitelisted, meaning the HTTP API can connect to it.
|
|||
Tests whether a remote and local URL is whitelisted | |||
Code | <nowiki>
-- Check against a remote address
print(http.checkURL("https://example.computercraft.cc/"))
-- Check against a local address
print(http.checkURL("https://localhost"))
</nowiki>
|
||
Output | <nowiki>
true
false Domain not permitted
</nowiki>
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
http.checkURL Function | |
---|---|
Syntax http.checkURL(
| |
Returns | boolean true | boolean false, string error |
API | http |
Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.