How do I set multipart in axios with react? : <p>When I curl something, it works fine:</p>

<pre><code>curl -L -i -H 'x-device-id: abc' -F "url=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"  http://example.com/upload
</code></pre>

<p>How do I get this to work right with axios? I'm using react if that matters:</p>

<pre><code>uploadURL (url) {
  return axios.post({
    url: 'http://example.com/upload',
    data: {
      url: url
    },
    headers: {
      'x-device-id': 'stuff',
      'Content-Type': 'multipart/form-data'
    }
  })
  .then((response) =&gt; response.data)
}
</code></pre>

<p>This doesn't work for some reason.</p>
