Hi newby in wix here
I am using this code:
const bookbiblestudyAPI = “some API URL”;
let fetchOptions = { method: ‘post’, data: {
‘devtoken’: ‘mydev_token’,
‘uname’: ‘Jerico Garcia’,
‘uemail’: ‘jericogarcia1227@gmail.com’,
‘usubject’: ‘Test Subject’,
‘umessage’: ‘This is a test message’
}};
fetch(bookbiblestudyAPI, fetchOptions).then( (httpResponse) => {
if (httpResponse.ok) {
console.log(httpResponse);
} else {
console.log(httpResponse);
}
}). catch ( (error) => { console.log(error); });
It can access my api url get get some response but there is no post value sending on my API, Do you have any clue how can I fix this ???