class Person
{
constructor(name)
{
this.name = name;
const fn = async ()=>{
let r =await fetch('/test', {method: 'POST', body: JSON.stringify({name:this.name}), headers: {'Content-type': 'application/json; charset=UTF-8'}})
return r.json();
}
const result = fn();
return result;
}
}