I am building a web app with react, and when I try to request to my API using a custom method (AUTH) it says I requested with the OPTIONS method. here is my code
await fetch(apiUrl + '/' + formState.values.email + '/' + formState.values.password,{method: 'AUTH', body: ""}).then(async (res) => {
if (res.status === 200) {
await res.json().then((data) => {
localStorage.setItem('user_data', JSON.stringify(data.user_data));
localStorage.setItem('user_auth', JSON.stringify(data.user_auth));
});
}
}).then(() => {
router.history.push('/');
})
but in by backend service it says different, here is the screenshot of my backend
Can Anyone help me with this problem ?