Skip to content

Instantly share code, notes, and snippets.



Forked from akexorcist/index.js
Created Mar 17, 2019
What would you like to do?
Axios post method requesting with x-www-form-urlencoded content type
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=',
awesome: true
const config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}, 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
You can’t perform that action at this time.