redux-easy2-crud
Version:
Easy crud programming with Redux
14 lines (11 loc) • 344 B
JavaScript
import isoFetch from "isomorphic-fetch"
const ROOT_PATH = 'http://localhost:3001/';
export function existIdPromise( path, id) {
const fullPath = ROOT_PATH + path + '/' + id
return isoFetch( fullPath, 'get', {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
})
}