title: Make request to SOAP endpoint using axios
body: <p>I need to make request to SOAP endpoint using <code>axios</code> in my <code>React</code> application. Hence I need to pass xml data in request and receive xml data in response.</p>
  
  <p>I have used the axios post with json data but how do I use the same for xml?  PFB the code I am using for the same, but it does not work.</p>
  
  <p>JSON post request:</p>
  
  <pre><code>var xmlData = &lt;note&gt;
  &lt;to&gt;Tove&lt;/to&gt;
  &lt;from&gt;Jani&lt;/from&gt;
  &lt;heading&gt;Reminder&lt;/heading&gt;
  &lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
  &lt;/note&gt;
  
  var config = {
    headers: {'Content-Type': 'text/xml'}
  };
  
  axios.post('/save', xmlData, config);
  </code></pre>
  
  <p>Please share if you have any experience with this, TIA.</p>