3.0.2 • Published 9 months ago

deta-space-bare-client v3.0.2

Weekly downloads
-
License
-
Repository
github
Last release
9 months ago

Deta Bare Client

API Wrapper for Deta Space, implementing the TompHTTP specifications

Usage

See the Authentication Doc for more information on how to get your access token.

bare
  .createBareClient(`http://${window.location.host}/bare/`)
  .then(async (client) => {
    const spaceFetch = detaBareClient.fetchFn(
      prompt("Deta Space Token"),
      client
    );
    spaceFetch("/apps")
      .then((res) => res.json())
      .then((payload) => {
        console.log(payload);
      })
      .catch((err) => {
        console.error(err);
      });
  });