Skip to content
/ api Public

API layer providing generic way to make restful requests

Notifications You must be signed in to change notification settings

frontojs/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fronto Api

Basic wrapper for the fetch api, you can pass this object into a fronto-connect instance

Basic Usage

import { Connect } from 'fronto-connect';
import api from 'fronto-api';

class Store extends Connect {
  namespace = 'api/v1';
  resource = 'resource';
}

const source = api({
  endpoint: 'https://endpoint',
  header: (h) => {
    h.append('Some-Key', someValue);
  },
  request: {
    credentials: 'same-origin',
  }
});

new Store(source);

About

API layer providing generic way to make restful requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published