I have problem with pre-flight request on react website when axios request post method it send optional request before

Viewed 19

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 ??

this is my function :

export async function onGetP(){
    let data= await axios.post(`${Link}/getP`, { "ApiKey": ApiKey , "Cust": ReactSession.get("Cust")  }).then(res => {
      const data = decrypt(res.data);
      const datajson = JSON.parse(data);
        return (datajson);
    });
    return data
}
0 Answers
Related