I am using react and I am doing a form and I want to save data in the database in sequel pro and I am using this code:
fetch('/api/create/registro', {
method: 'post',
mode: 'CORS',
headers: {
Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json'
},
It generates an error in the fetch and I would like to know how the code is made in react to save data in the database.