Skip to content

Can Any body Help ? POST http://localhost:5000/api/notes/addNotes 400 (Bad Request)  #39

Open
@vinaysharma9600

Description

@vinaysharma9600

When I Try to call the Add Note Api From fronted the geting an issue :-
const addNote = async(title,description,tag)=>{ //TODO : API Calls const response = await fetch(${host}/api/notes/addNotes`, {
method:'POST',
headers:{
'Content-Type':'application/json',
"auth-token" :'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiNjM3Y2M5NWVlZmVlZTI5NjdlNWVkOWVjIn0sImlhdCI6MTY2OTIwMzgzNn0.-TJ8Rn6mrzY6JrQhwoProF8PixCXnnpgsAx2OQfSS8I'
},
body: JSON.stringify({"title":title,"description":description,"tag":tag})
})

    const note = await response.json();
    setNotes(notes.concat(note));
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions