UNPKG

291 BJavaScriptView Raw
1'use strict';
2
3const Client = require('..');
4const json = require('go-fetch-json');
5
6new Client()
7 .use(json())
8 .post('http://httpbin.org/post', {msg: 'Go fetch!'})
9 .then(res => res.json())
10 .then(json => console.log(res.toString(), json))
11 .catch(err => console.error(err))
12;
13