I use react in front-end and cs-cart API in back-end. In the following code I used axios.put() as follows:
const data = JSON.stringify({
"test1": "val1"
});
const config = {
method: 'put',
url: 'https://example.com/api/product/111',
headers: {
'Authorization': `Basic ${token}`,
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(res => {
console.log(res)
});
When sending a request, the browser sends a request with the OPTIONS method, which error: 405 Method Not Allowed returns. And the original request (PUT) is not sent.
cs-cart is installed on the server. And the react project on localhost


Have you made sure to understand the error correctly i.e
Make sure that the server is able to understand how to interpret your request so the clients are able to proceed.
You can look at this in more detail below here.