Created
November 10, 2017 15:41
-
-
Save cazetto/ac2123e60b26041910c6dc9b98bd5064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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