I am writing axios post function to search for vehicle details using chassis number and other details .. Postman shows no error and works very well but it shows 403 error when trying to run the code
export const searchByChassis = (chassis: string, seq?: string, customNo?: string) => async dispatch => { return await axios( { method: 'post', url: '/api/sticker/details', headers: { 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8', 'x-clientId': xClientId, "Access-Control-Allow-Origin":"*" }, data: { chassis: chassis, seq: seq ? seq : "NULL", customNo: customNo ? customNo : "NULL" } }) .then(response => {
return JSON.stringify(response);
}).catch((error) => console.log(error));