uber-api
Post form data with axios in Node.js
You might be able to use Content-Type: ‘application/x-www-form-urlencoded’. I ran into a similar issue with https://login.microsoftonline.com where it was unable to handle incoming application/json. var axios = require(“axios”); axios({ url: ‘https://login.uber.com/oauth/v2/token’, headers: { ‘Content-Type’: ‘application/x-www-form-urlencoded’ }, data: `client_id=${encodeURIComponent(‘**’)}&client_secret=${encodeURIComponent(‘**’)}&grant_type=authorization_code&redirect_uri=${encodeURIComponent(‘http://localhost:8080/’)}&code=${encodeURIComponent(‘**’)}` }) .then(function(response) { console.log(response.data) }) .catch(function(error) { console.log(error) }) You could also use a function to handle … Read more