Skip to content

Instantly share code, notes, and snippets.

@cazetto
Created November 10, 2017 15:41
Show Gist options
  • Save cazetto/ac2123e60b26041910c6dc9b98bd5064 to your computer and use it in GitHub Desktop.
Save cazetto/ac2123e60b26041910c6dc9b98bd5064 to your computer and use it in GitHub Desktop.
const API = {
headers: new Headers(),
init(appId, appRestKey) {
API.headers.append('X-Parse-Application-Id', appId);
API.headers.append('X-Parse-REST-API-Key', appRestKey);
},
events: {
get: ()=> {
return fetch('https://parseapi.back4app.com/classes/events?', {
method: 'GET',
headers: API.headers,
mode: 'cors',
cache: 'default'
});
}
}
}
export default API;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment