Skip to content

Instantly share code, notes, and snippets.

@raphaelpor
Last active November 27, 2016 00:48
Show Gist options
  • Save raphaelpor/d37c2ce4e7872caa8bcebc13ceedb7bd to your computer and use it in GitHub Desktop.
Save raphaelpor/d37c2ce4e7872caa8bcebc13ceedb7bd to your computer and use it in GitHub Desktop.
import fitch from 'fitch';
const config = {
body: { cat: 'grumpy' },
cache: 'no-cache',
mode: 'no-cors',
params: {
categ: 10,
type: 5,
},
}
fitch.post('http://localhost:8080/cats', config)
.then(response => {
console.log(response.data);
})
.catch(err => {
console.log(err.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment