Hi, I'm trying to create an http-function like this:
//...import etc...
export function post_logs(request) {
let options = {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Access-Control-Max-Age": "86400"
}
};
return request.body.json()
.then(body => {
//etc..
However when I test on Postman I'm getting: "error":{"name":"JsonSyntaxError","errorGroup":"User"}}
I think it's CORS issue since I don't get it when I test it from another Wix site.
Any thoughts?
Never mind. It was just a stupid syntax error in the JSON.
This seems very complicated. This is too advanced for me to respond. But, if you don't mind, may I ask, what are you trying to execute with this ?