Post a new user

John Doe
john.doe@example.com
const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({first_name:"John",last_name:"Doe",email:"john.doe@example.com",avatar:"https://images.freecreatives.com/wp-content/uploads/2017/01/Person-Icons.jpg"})};fetch("https://reqres.in/api/users",e).then(e=>e.json()).then(e=>{console.log("user",e),document.getElementById("user").innerHTML=`\n <div class="card">\n <img src="${e.avatar}" class="section media">\n <div class="section">\n <p>${e.first_name} ${e.last_name}<br>\n <a href="mailto:${e.email}">${e.email}</a>\n </p>\n </div>\n </div>`}).catch(e=>console.log(e));
//# sourceMappingURL=post.js.map