Last active
August 7, 2016 01:48
-
-
Save rodoabad/d071b7465778a4a2fa18cf778b157493 to your computer and use it in GitHub Desktop.
This file contains 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
import 'isomorphic-fetch'; | |
export const getFruits = () => { | |
const endPoint = '/fruits'; | |
return fetch(endPoint) | |
.then(response => response.json()) | |
.catch(error => error.json()); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment