DELETE document with REST API

92 views
Skip to first unread message

Marco Alvarado

unread,
Apr 27, 2022, 8:26:54 PM4/27/22
to Firebase Google Group
Hello, I woud like to delete a document with the REST API. I don't get it done with the Firebase documentation, I'm really sorry about this!!

This is how I create a record:
  const userId = context.rootGetters.userId;
 const newCP = {

            headline: payload.newCPHeadline,
            body: payload.newCPText,
            section_id: payload.secID,
            updated: timestamp,
            newdate: timestamp

      }

     
        body:JSON.stringify(newCP)
      });
 const res = await response.json(); ..... and-so-on...

How can I delete this item in the same way that I have created it? 
(I mean not using any firestore modul that I have to import and so on..)

Thanks!
Reply all
Reply to author
Forward
0 new messages