From b43985a19308cc47a7af9b74f74efdfc54be7a83 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 15 Jun 2026 17:33:47 +0200 Subject: add headers mechanism to response --- src/z/rest.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/z/rest.js (limited to 'src/z/rest.js') diff --git a/src/z/rest.js b/src/z/rest.js new file mode 100644 index 0000000..c14944d --- /dev/null +++ b/src/z/rest.js @@ -0,0 +1,20 @@ + +const Rest = { + Request: class { + constructor(base) { + this.base = base; + } + + get(url) { return fetch(url); } + + post(url, body) { + return fetch( + url, + { + method: 'POST', + body: JSON.stringify(body), + } + ); + } + }, +}; -- cgit v1.2.3-70-g09d2