Skip to content

Instantly share code, notes, and snippets.

@rodoabad
Last active August 7, 2016 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodoabad/d071b7465778a4a2fa18cf778b157493 to your computer and use it in GitHub Desktop.
Save rodoabad/d071b7465778a4a2fa18cf778b157493 to your computer and use it in GitHub Desktop.
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