Last active
January 9, 2020 15:21
-
-
Save zubair1024/554bcdb55d82dd227c4a5c43fb46e9ab to your computer and use it in GitHub Desktop.
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('querystring') | |
const requestBody = { | |
name: 'Akexorcist', | |
age: '28', | |
position: 'Android Developer', | |
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/', | |
awesome: true | |
} | |
const config = { | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded' | |
} | |
} | |
axios.post(url, qs.stringify(requestBody), config) | |
.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