<p dir="auto"><strong>Describe the bug</strong><br>
I am trying to post some data with content type application/x-www-form-urlencoded but the content type is changed to multipart/form-data; when I do a post of formdata</p>
<p dir="auto"><strong>To Reproduce</strong><br>
The situation is reproducable here: <a href="https://codepen.io/ferrykranenburg/pen/abdZrGG" rel="nofollow">https://codepen.io/ferrykranenburg/pen/abdZrGG</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var bodyFormData = new FormData();
bodyFormData.set(&quot;dbpath&quot;, &quot;somedata&quot;);
bodyFormData.set(&quot;username&quot;, &quot;somedata&quot;);
bodyFormData.set(&quot;password&quot;, &quot;somedata&quot;);
bodyFormData.set(&quot;token&quot;, &quot;somedata&quot;);

axios({
  method: &quot;post&quot;,
  url: &quot;https://dev07.changetocomm.net/ac/api/credentials/&quot;,
  data: bodyFormData,
  headers: { &quot;content-type&quot;: &quot;application/x-www-form-urlencoded&quot; }
});"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">bodyFormData</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">FormData</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">bodyFormData</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s">"dbpath"</span><span class="pl-kos">,</span> <span class="pl-s">"somedata"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">bodyFormData</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s">"username"</span><span class="pl-kos">,</span> <span class="pl-s">"somedata"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">bodyFormData</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s">"password"</span><span class="pl-kos">,</span> <span class="pl-s">"somedata"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">bodyFormData</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s">"token"</span><span class="pl-kos">,</span> <span class="pl-s">"somedata"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-en">axios</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">method</span>: <span class="pl-s">"post"</span><span class="pl-kos">,</span>
  <span class="pl-c1">url</span>: <span class="pl-s">"https://dev07.changetocomm.net/ac/api/credentials/"</span><span class="pl-kos">,</span>
  <span class="pl-c1">data</span>: <span class="pl-s1">bodyFormData</span><span class="pl-kos">,</span>
  <span class="pl-c1">headers</span>: <span class="pl-kos">{</span> <span class="pl-s">"content-type"</span>: <span class="pl-s">"application/x-www-form-urlencoded"</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong><br>
The post should be done with 'application/x-www-form-urlencoded' like I'm adding to the headers.</p>
<p dir="auto"><strong>Environment:</strong></p>
<ul dir="auto">
<li>Axios Version [e.g. 0.19.2]</li>
<li>OS: Windows 10</li>
<li>Browser: Chrome</li>
<li>Browser Version: latest</li>
</ul>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
See screenshot, the post is done with multipart/form-data header.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5680394/84625491-a8249380-aee3-11ea-85fc-dc39d67b6f9b.png"><img src="https://user-images.githubusercontent.com/5680394/84625491-a8249380-aee3-11ea-85fc-dc39d67b6f9b.png" alt="image" style="max-width: 100%;"></a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="axios({
                method: &quot;PUT&quot;,
                url: url,
                transformRequest: [function (data, headers) {
                    // Do whatever you want to transform the data
                    return formData;
                }],
                headers: {
                    'Content-Type': file.type
                },
                &quot;withCredentials&quot;: false
            });"><pre class="notranslate"><span class="pl-en">axios</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
                <span class="pl-c1">method</span>: <span class="pl-s">"PUT"</span><span class="pl-kos">,</span>
                <span class="pl-c1">url</span>: <span class="pl-s1">url</span><span class="pl-kos">,</span>
                <span class="pl-c1">transformRequest</span>: <span class="pl-kos">[</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">,</span> <span class="pl-s1">headers</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                    <span class="pl-c">// Do whatever you want to transform the data</span>
                    <span class="pl-k">return</span> <span class="pl-s1">formData</span><span class="pl-kos">;</span>
                <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
                <span class="pl-c1">headers</span>: <span class="pl-kos">{</span>
                    <span class="pl-s">'Content-Type'</span>: <span class="pl-s1">file</span><span class="pl-kos">.</span><span class="pl-c1">type</span>
                <span class="pl-kos">}</span><span class="pl-kos">,</span>
                <span class="pl-s">"withCredentials"</span>: <span class="pl-c1">false</span>
            <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Launched request with Content-Type：<br>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryPz13ZA77aLqgPlwB</p>