-
-
Save dongnguyenltqb/c2eca12d4a0e42a70d34c3daa73a2faf to your computer and use it in GitHub Desktop.
Revisions
-
akexorcist revised this gist
Jan 4, 2021 . 1 changed file with 8 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,21 @@ const axios = require('axios') /* ... */ const params = new URLSearchParams() params.append('name', 'Akexorcist') params.append('age', '28') params.append('position', 'Android Developer') params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') params.append('awesome', true) const config = { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } axios.post(url, params, config) .then((result) => { // Do somthing }) -
akexorcist revised this gist
Aug 14, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ const axios = require('axios') const qs = require('querystring') ... @@ -16,7 +17,7 @@ const config = { } } axios.post(url, qs.stringify(requestBody), config) .then((result) => { // Do somthing }) -
akexorcist created this gist
Jan 3, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ const axios = require('axios') ... 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, requestBody, config) .then((result) => { // Do somthing }) .catch((err) => { // Do somthing })