1letnewPost={ 2userId:1, 3title:"My post", 4body:"This is my first post" 5}; 6 7fetch("https://jsonplaceholder.typicode.com/posts",{ 8method:"POST", 9headers:{10"Content-Type":"application/json"11},12body:JSON.stringify(newPost)13})14.then((rawResponse)=>{15if(!rawResponse.ok){16thrownewError(17`code: ${rawResponse.status}, status text: ${rawResponse.statusText}`18);19}20returnrawResponse.json();21})22.then((jsonifiedResponse)=>23console.log("Jsonified data: ",jsonifiedResponse)24)25.catch((error)=>console.log(error));