I need to expose a .svelte component that receives data through the post method, so that an external service can consume it and that the received data can be displayed as received
// test.svelte
<script>
let name="";
let age="";
let gender ="";
export async function post({request}){
const body = await request.json();
console.log(body);
name = body.name;
age = body.age;
gender = body.gender;
return {
body:JSON.stringify({body})
}
});
</script>
<form>
<div>
<p>{name} {age} {gender}</p>
</div>
</form>