I have a landing page with kick off labs. When a form is submitted from that page i used a webhook to my wix website. Kick off labs posts data to my end point url is https://www.mywixsite.com/_funtions/myFunction
This is the top of my backend http-funtion.js
import {created, serverError} from ‘wix-http-functions’ ;
import wixData from ‘wix-data’ ;
export function post_myFunction(request) {
let options = {
“headers” : {
“Content-Type” : “application/json”
}
};
let name;
let email;
if (request.body) {
name = request.body.text(“name”)
if i use request.body.text() i can see all the variables.
I am just not sure what is the syntax to parse it. I need name and email
I have tried alot of different combinations request.body.text(“name”), request.body.text(1), request.body.text[name] to name a few. but i just cant capture the incoming information.
I was talking with another person and he mentioned that i may need to install a json library? If thats the case maybe thats why its not working? If so how do i install this?