title: Form submission to Mailchimp using Vue.js and Axios results in CORS error
body: <p>I have a component in my Vue.js app that submits email from a form to Mailchimp using Axios.</p>
  
  <p>I've read that to get around CORS in Mailchimp's post URL, I need to use the <code>post-json</code> version and add <code>&amp;c=?</code> to the end of the URL. I've also updated my request method from <code>POST</code> to <code>GET</code> and serialized my form input.</p>
  
  <p><strong>Component.vue</strong></p>
  
  <pre><code>&lt;mailchimp-subscribe action="https://example.us15.list-manage.com/subscribe/
  post-json?u=xxx&amp;amp;id=xxx&amp;amp;c=?"&gt;&lt;/mailchimp-subscribe&gt;
  </code></pre>
  
  <p><strong>MailchimpSubscribe.vue</strong></p>
  
  <pre><code>&lt;template&gt;
    &lt;form @submit.prevent="subscribe"&gt;
      &lt;input v-model="email" type="email" name="EMAIL" value="" placeholder="Email Address" required&gt;
      &lt;input class="button" type="submit" value="Subscribe"&gt;
    &lt;/form&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
    import axios from 'axios'
  
    export default {
      name: 'MailchimpSubscribe',
      props: {
        action: {}
      },
      data: () =&gt; ({
        email: '',
        response: {}
      }),
      methods: {
        subscribe: function (event) {
          axios({
            method: 'get',
            url: this.action,
            data: JSON.stringify(this.email),
            cache: false,
            dataType: 'json',
            contentType: 'application/json; charset=utf-8'
          })
          .then(response =&gt; {
            console.log(response)
          })
          .catch(error =&gt; {
            console.log(error)
          })
        }
      }
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>Using the code above, I still get the following error:</p>
  
  <blockquote>
    <p>Failed to load <a href="https://example.us15.list-manage.com/subscribe/post-json?u=xxx&amp;id=xxx&amp;c=" rel="nofollow noreferrer">https://example.us15.list-manage.com/subscribe/post-json?u=xxx&amp;id=xxx&amp;c=</a>?: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a>' is therefore not allowed access.</p>
  </blockquote>
  
  <p>Is there a step I'm missing?</p>