Skip to content
Advertisement

Translating Curl Request with Form Data to Axios

I’m trying to mimic the following request using axios:

JavaScript

More information: https://developer.capitalone.com/documentation/o-auth

I came up with the following code:

JavaScript

This keeps timing out and not giving me any response, which leads me to believe my request is malformed. Am I doing something wrong in trying to create this request with form data using axios?

Advertisement

Answer

Paste your curl command into https://curlconverter.com/node-axios/ and it will convert it to

JavaScript
Advertisement