title: How to send form data in POST request in Nuxtjs 3
body: <p>Am working on a static website but I need to contact form which is suppose to send form data to an email, Am using nuxtjs 3, have tried using <em>useFetch()</em>, am also trying to use <em>axios</em>.</p>
  <p>Here is what I have</p>
  <p><strong>Contact Vue Template</strong></p>
  <pre><code>&lt;template&gt;
    &lt;section id=&quot;ng-ctt&quot; class=&quot;ng-ctt&quot;&gt;
      &lt;div class=&quot;ng-ct&quot;&gt;
        &lt;div class=&quot;ng-fx&quot;&gt;
          &lt;div class=&quot;ng-fx6-m&quot;&gt;
            &lt;figure class=&quot;ng-ctt-img&quot;&gt;
              &lt;img src=&quot;~/assets/media/illustrations/contact.svg&quot; alt=&quot;ctt img&quot; class=&quot;ng-img&quot;&gt;
            &lt;/figure&gt;
          &lt;/div&gt;
          &lt;div class=&quot;ng-fx6-m&quot;&gt;
            &lt;div class=&quot;ng-fxc&quot;&gt;
              &lt;div class=&quot;ng-ctt-text&quot;&gt;
                &lt;span class=&quot;ng-title&quot;&gt;Mail&lt;/span&gt;
                &lt;NuxtLink to=&quot;mailto:hi@paddi.ng&quot; class=&quot;ng-link&quot;&gt;hi@paddi.ng&lt;/NuxtLink&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;ng-ctt-text&quot;&gt;
                &lt;span class=&quot;ng-title&quot;&gt;Location&lt;/span&gt;
                &lt;span class=&quot;ng-text&quot;&gt;Lagos, Nigeria&lt;/span&gt;
              &lt;/div&gt;
             
              &lt;div class=&quot;ng-ctt-text&quot;&gt;
                &lt;span class=&quot;ng-ctt-text-or&quot;&gt;OR&lt;/span&gt;
              &lt;/div&gt;
  
              &lt;form @submit.prevent=&quot;submitForm&quot; id=&quot;ng-fm&quot; class=&quot;ng-fm&quot;&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;input type=&quot;text&quot; v-model=&quot;formData.full_name&quot; class=&quot;ng-inp&quot; placeholder=&quot;Full Name&quot;&gt;
                &lt;/div&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;input type=&quot;text&quot; v-model=&quot;formData.email&quot; class=&quot;ng-inp&quot; placeholder=&quot;Email&quot;&gt;
                &lt;/div&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;input type=&quot;text&quot; v-model=&quot;formData.phone_no&quot; class=&quot;ng-inp&quot; placeholder=&quot;Phone Number&quot;&gt;
                &lt;/div&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;input type=&quot;text&quot; v-model=&quot;formData.service&quot; class=&quot;ng-inp&quot; placeholder=&quot;Service&quot;&gt;
                &lt;/div&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;textarea name=&quot;&quot; v-model=&quot;formData.message&quot; class=&quot;ng-inp&quot; placeholder=&quot;Message&quot;&gt;&lt;/textarea&gt;
                &lt;/div&gt;
                &lt;div class=&quot;ng-fm-row&quot;&gt;
                  &lt;button class=&quot;ng-bt-pri&quot; type=&quot;submit&quot;&gt;Send Message&lt;/button&gt;
                &lt;/div&gt;
              &lt;/form&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;
  &lt;/template&gt;
  </code></pre>
  <p><strong>Contact Script</strong></p>
  <pre><code>&lt;script lang=&quot;ts&quot; setup&gt;
    interface formData {
      full_name: string,
      email: string,
      phone_no: string,
      service: string,
      message: string,
    }
  
    let formStatus: {} = {
      loading: false,
      success: false,
      error: false,
    }
  
    let formData: formData = {
      full_name: &quot;&quot;,
      email: &quot;&quot;,
      phone_no: &quot;&quot;,
      service: &quot;&quot;,
      message: &quot;&quot;,
    };
  
    async function submitForm() {
  
      // console.log(data);
      // console.log(JSON.stringify(formData));
      // this.formStatus.loading = true,
      // await this.$axios.$post(&quot;/api/contact&quot;, {
      //   full_name: this.full_name,
      //   email: this.email,
      //   phone_name: this.phone_name,
      //   service: this.service,
      //   message: this.message
      // }).then(response =&gt; {
      //   this.success = true
      //   this.errored =false
      // }).catch(error =&gt; {
      //   this.errored = true
      // }).finally(() =&gt; {
      //   this.loading = false
      // });
    }
  
    // return {
    //   formData: formData
    // }
  
  &lt;/script&gt;
  </code></pre>
  <p>Main Question is How to send form data in POST request in Nuxtjs 3.</p>