Quantcast
Channel: Active questions tagged mongodb-atlas - Stack Overflow
Viewing all articles
Browse latest Browse all 271

I'm getting this error "URL scheme "mongodb+srv" is not supported."

$
0
0

In react.js I'm making a api call using post method but I'm getting error in the console.

Here is my backend code

 const editNote = async (id, title, description, tag) => {    //api callconst host = 'mongodb+srv://vivek:xyz@cluster0.mdigo2h.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0'    const response = await fetch(`${host}/api/notes/updatenote/${id}`, {      method: "POST",      headers: {"Content-Type": "application/json","auth-token":"xyz",      },      body: JSON.stringify({ title, description, tag }),    });    const json = response.json();}

In frontend there are input fields and a button when a click on button then I get error.

 Frontend

 error in the console

If know the solution kindly tell.Thanks in advance.


Viewing all articles
Browse latest Browse all 271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>