So what we are wondering is what our backend is supposed to expect. We were expecting that it will send a post request. I took a look at the php code from the example, but since we are not using php it is not very useful. If it is only possible in php then we might need to look for other options.
The problem is we do not get any data send to the backend. How can we fix this? Does it need to load from the backend first? The only thing that sync request is doing is sending OPTIONS request to our backend
crudManager: {
// autoSync: true,
autoLoad: true,
transport: {
load: {
url: 'https://172.31.226.249:5000/post/info',
method : 'GET',
headers:{
'Content-Type': 'application/json'
}
},
// sync: {
// url: 'https://172.31.226.249:8081/events',
// // specify Content-Type for requests
// headers: {
// 'Content-Type': 'application/json',
// authorization: "Bearer " + getCookie("ycon_auth0_token")
// },
// },
},
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse: true,
}
Sometimes it sends a options request before sending the get request. Do I need to add something to the load function?