title: Using React and axios for curl
body: <p>Is it possible to make a <code>curl</code> request by using <code>axios</code>?</p>
  
  <p>the curl string is:</p>
  
  <pre><code>curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate' --data 'client_id=1234&amp;client_secret=1234&amp;grant_type=client_credentials&amp;scope=bucket:create bucket:read data:write data:read viewables:read' --header 'Content-Type: application/x-www-form-urlencoded' -k | jq '.'
  </code></pre>
  
  <p>I tried to do this: </p>
  
  <pre><code>getToken() {
  
      axios.get({
          url: 'https://developer.api.autodesk.com/authentication/v1/authenticate',
          data: {
              client_id: '1234',
              client_secret: '1234',
              grant_type : 'client_credentials',
              scope: 'data:read data:viewables'
          },
          beforeSend: function(xhr) {
               xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
          }, success: function(data){
              console.log(data)
          }
      })        
  }
  </code></pre>
  
  <p>But with no luck - e.g. nothing happens.</p>
  
  <p>I previously used the <code>cygwin</code>-terminal to make the <code>curl</code>-request and I succesfully got the response</p>
  
  <pre><code>{
   "token_type": "Bearer",
   "expires_in": 1799,
   "access_token": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5X2RldiJ9.eyJjbGllbnRfaWQiOiJjWTFqcm1rQXhPSVptbnNsOVhYN0puVURtVEVETGNGeCIsImV4cCI6MTQ4NzU2NzgwMSwic2NvcGUiOlsiZGF0YTpyZWFkIl0sImF1ZCI6Imh0dHBzOi8vYXV0b2Rlc2suY29tL2F1ZC9qd3RleHAzMCIsImp0aSI6InJZcEZZTURyemtMOWZ1ZFdKSVVlVkxucGNWT29BTDg0dFpKbXlmZ29ORW1MakF0YVVtWktRWU1lYUR2UGlnNGsifQ.uzNexXCeu4efGPKGGhHdKxoJDXHAzLb28B2nSjrq_ys"
  }
  </code></pre>
  
  <p>So, is this possible with React/axios? </p>
  
  <p>In addition to the question, can I pass the received token to another <code>curl</code> request? </p>