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
}