good day im trying to fetch post my data to third party website i was able to connect to the 3rd party and send data but it returns null can someone help me here is my code and here is the responce plss see the code and images.
backed code test.jsw
export function postSomething() {
let key = JSON.stringify({auth_token: “KoGSPgTkyoRSPS17c4pq” })
return fetch( “https://casecenter-dev-167.gdslinkasia.com/aviso/appraisal/records/create.json” , {
method: ‘POST’ ,
headers: {
‘Content-Type’ : ‘application/json’
},
body: JSON.stringify({
auth_token:“tokenprovided”,
})
}).then((httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
} else {
return Promise.reject( “Fetch did not succeed” );
}
});
}
front end code
export function button21_click_1(event, $w) {
const data = { record:{
“app_account_middle_name” :$w( “#input14” ).value,
“app_account_first_name” : “last”
}};
postSomething(data)
.then(httpResponse => {
console.log( "httpResponse: " + httpResponse);
httpResponse;
})
. catch (error => {
console.log(error);
});
}
request payload
preview
response
i hope somepne can help me with this.