title: I have problem with pre-flight request on react website when axios request post method it send optional request before
body: <p><strong>I have problem on react when axios request post method it send optional request before i want to send post request only! how to handle this problem ??</strong></p>
  <p>this is my function :</p>
  <pre><code>export async function onGetP(){
      let data= await axios.post(`${Link}/getP`, { &quot;ApiKey&quot;: ApiKey , &quot;Cust&quot;: ReactSession.get(&quot;Cust&quot;)  }).then(res =&gt; {
        const data = decrypt(res.data);
        const datajson = JSON.parse(data);
          return (datajson);
      });
      return data
  }
  </code></pre>