From 92e8596b78982885803994b50c6b35f73f7a403e Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Tue, 19 Sep 2023 23:40:03 +0100 Subject: :recycle: So long monorepo. --- compat/lustre_http/src/ffi.mjs | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 compat/lustre_http/src/ffi.mjs (limited to 'compat/lustre_http/src/ffi.mjs') diff --git a/compat/lustre_http/src/ffi.mjs b/compat/lustre_http/src/ffi.mjs deleted file mode 100644 index bb01b09..0000000 --- a/compat/lustre_http/src/ffi.mjs +++ /dev/null @@ -1,16 +0,0 @@ -export const do_request = (method, url, body, on_success, on_error) => { - let xhr = new XMLHttpRequest() - xhr.onerror = _evt => { - console.log("error for", method, url, ":", xhr) - on_error(888, "oops!") - } - xhr.onloadend = _evt => { - switch (xhr.status) { - case 200: - case 204: on_success(xhr.responseText); break; - default: on_error(xhr.status, xhr.responseText) - } - } - xhr.open(method, url) - xhr.send(body); -} -- cgit v1.2.3