Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 664 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 664 Bytes

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);
      });
  });