React-Axios "405 Method Not Allowed" error

时间:2019-04-16 22:57:14

标签: reactjs api post axios postman

I'm using WCF Rest Service as an API and React Client Side.

I can successfully post to my API with POSTMAN, but I cannot post from my client side (React) with AXIOS.

I'm getting the following error: "405 Method Not Allowed"

POSTMAN - URL, Body (JSON (application/json))

http://185.122.201.80/OISServis/OISServis.svc/GirisYap
{
    "kulAd":"User",
    "sifre":"Pass"
}

REACT

var headers = {
        'Content-Type': 'application/json;charset=UTF-8',
        "Access-Control-Allow-Origin": "*",
}
const response = await axios.post('http://185.122.201.80/OISServis/OISServis.svc/GirisYap', kullanici, {headers: headers});

0 个答案:

没有答案