Networking & web · BUILT-IN MODULE
net
HTTP/HTTPS networking through curl.
Quick start
use net
body = try net.get "https://example.com"
try net.download "https://example.com/file.txt" "file.txt"API reference
net.get urlGET an HTTP/HTTPS URL through curl. Fallible.
GET an HTTP/HTTPS URL through curl. 此操作可能失敗。
net.post url bodyPOST Text through curl. Fallible.
POST Text through curl. 此操作可能失敗。
net.post_json url jsonPOST JSON through curl. Fallible.
POST JSON through curl. 此操作可能失敗。
net.request method url bodyGeneral network request. Fallible.
General network request. 此操作可能失敗。
net.download url pathDownload a URL to a file. Fallible.
下載 a URL to a file. 此操作可能失敗。