In the following code I make a post request to a firebase database, I was wondering if there is a way to put an id or name to the posted item, that way I can call from my code, i try whit PUT but that delete all the other elements
fetch(
"https://prodcutosjuangranel-default-rtdb.firebaseio.com/productos.json",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(producto),
}
).then(() => {
console.log("ok");
});