Last active
October 9, 2018 03:35
-
-
Save arfaWong/e1618ebca544c3fa75102ee67ab76811 to your computer and use it in GitHub Desktop.
Axios post method requesting with x-www-form-urlencoded content type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const qs = require('qs'); | |
axios.post('/foo', qs.stringify({ 'bar': 123 }) | |
.then((result) => { | |
// Do somthing | |
}) | |
.catch((err) => { | |
// Do somthing | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment