[Vuejs]-Post doc to CouchDB from Quasar Vue3 Axios

0๐Ÿ‘

โœ…

I have found the answer in the syntax:

  api({
    method: "POST",
    url: "/webdata",
    data: doc,
    })
    .then((result) => {
      console.log("result: ", result);
    })
    .catch((e) => {
      console.log("e: ", e);
    });

I removed the "headers: { Authorization: basicAuth }," and "headers: { "content-type": "application/json" }," I had already added it in the axios config.
Also, I made sure I had an _id inside the doc.

Leave a comment