diff options
Diffstat (limited to 'client/client.js')
| -rw-r--r-- | client/client.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client/client.js b/client/client.js new file mode 100644 index 0000000..7bc5c51 --- /dev/null +++ b/client/client.js @@ -0,0 +1,16 @@ + +import request from 'superagent' + +function fetch (api) { + return new Promise(function (resolve, reject){ + request + .api(api) + .set('Accept', 'application/json') + .end(function(err, res){ + console.log(res) + resolve(res) + }) + }) +} + +export default { fetch } |
