I m trying to requests on fake Jsonplaceholder api at my localhost. Delete request delete all data except id.
{
"id": 4
},
how can i delete id too? here is my code:
export class Request{
constructor(url){
this.url = url;
}
async delete(id){
const response = await fetch(this.url + "/" + id,{
method: "DELETE",
});
return "Veri Silindi"
}
app.js :
request.put(4)
.then(message => console.log(message))
.catch(err => console.log(err));