title: Axios Http client - How to construct Http Post url with form params
body: <p>I am trying to create a postHTTP request with some form parameters that are to be set.  I am using the axios with node server.  I already have a java code implementation of constructing a url as given below: </p>
  
  <p>JAVA CODE: </p>
  
  <pre><code>HttpPost post = new HttpPost(UriBuilder.fromUri (getProperty("authServerUrl"))
              .path(TOKEN_ACCESS_PATH).build(getProperty("realm")));
  
  List&lt;NameValuePair&gt; formParams = new ArrayList&lt;NameValuePair&gt;();
  
  formParams.add(new NameValuePair("username",getProperty ("username")));
  formParams.add(new NameValuePair("password",getProperty ("password")));
  formParams.add(new NameValuePair("client_id, "user-client"));
  </code></pre>
  
  <p>I am trying to do the same thing in axios. </p>
  
  <p>AXIOS IMPLEMENTATION: </p>
  
  <pre><code>axios.post(authServerUrl +token_access_path,
          {
                  username: 'abcd', //gave the values directly for testing
                  password: '1235!',
                  client_id: 'user-client'
          }).then(function(response) {
              console.log(response); //no output rendered
          }
  </code></pre>
  
  <p>Is the approach to set these form params on the post request correct?</p>