fetch("https://localhost:7245/Article").then(d => d.json()).then(console.log); let artikkel={ "Header":"tervitusproov3", "Content":"tere", "Comments": [] } fetch("https://localhost:7245/Article", { "headers": { "Accept": "application/json", "Content-Type": "application/json" }, "method": "POST", "body": JSON.stringify(artikkel) } ).then(d => d.json()).then(console.log); let kommentaar={ "Content":"Proovikommentaar32", "ArticleId":1002 } fetch("https://localhost:7245/Comment", { "headers": { "Accept": "application/json", "Content-Type": "application/json" }, "method": "POST", "body": JSON.stringify(kommentaar) } ).then(d => d.json()).then(console.log); fetch("https://localhost:7245/Article/1", {"method":"DELETE"}).then(d => d.json()).then(console.log);