1 | ;
|
2 |
|
3 | const Client = require('..');
|
4 | const json = require('go-fetch-json');
|
5 |
|
6 | new 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 |
|