Skip to content

Instantly share code, notes, and snippets.

View zainxyz's full-sized avatar
🎮
live in your world, play in ours

Zain zainxyz

🎮
live in your world, play in ours
View GitHub Profile
@zainxyz
zainxyz / ES6-HTTP.js
Last active August 7, 2017 05:26
A generic implementation of the ES6 Fetch() calls (GET, POST, PUT, PATCH, DELETE)
/**
* You might need to install node-fetch...if so then leave this line
* otherwise comment it out.
*/
// import fetch from 'node-fetch';
/**
* Generic Application Headers required for each API call.
*
* NOTE: The Accept and or Content-Type might be different for each HTTP call,