More buildins and vscode exstention <CO-AUthored, ai>

This commit is contained in:
allexanderbergmns
2026-08-25 16:20:11 +02:00
parent 5daadce7a9
commit 7ed774089e
27 changed files with 2080 additions and 122 deletions
+23
View File
@@ -21,3 +21,26 @@ fn post(url, data) {
fn get_text(url) {
return http_get(url).body
}
// request sends any method with custom headers (a {name: value} struct) and
// a timeout in milliseconds, and returns {status, body}. A timeout <= 0 uses
// the default (30s). Network failures throw; HTTP errors are normal responses.
fn request(method, url, data, headers, timeout_ms) {
return http_req(method, url, data, headers, timeout_ms)
}
fn get_with_headers(url, headers) {
return http_req("GET", url, "", headers, 0)
}
fn post_with_headers(url, data, headers) {
return http_req("POST", url, data, headers, 0)
}
fn get_timeout(url, timeout_ms) {
return http_req("GET", url, "", {}, timeout_ms)
}
fn post_timeout(url, data, timeout_ms) {
return http_req("POST", url, data, {}, timeout_ms)
}