CodeWithHarry / iNotebook-React

INotebook is a React Application for managing personal notes on the cloud
343 stars 193 forks source link

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

Open vinaysharma9600 opened 1 year ago

vinaysharma9600 commented 1 year ago

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));
}`
MohitBansal321 commented 1 year ago

first check in thunderclient api is working or not

ZAIN-BUKHARI commented 1 year ago

what type of error is coming

On Tue, Dec 20, 2022, 8:16 PM Mohit Bansal @.***> wrote:

first check in thunderclient api is working or not

— Reply to this email directly, view it on GitHub https://github.com/CodeWithHarry/iNotebook-React/issues/39#issuecomment-1359548590, or unsubscribe https://github.com/notifications/unsubscribe-auth/A23X73PWUMIXNKW3MJYNE4LWOHEV5ANCNFSM6AAAAAASR45ZZI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MohitBansal321 commented 1 year ago

what type of error is coming On Tue, Dec 20, 2022, 8:16 PM Mohit Bansal @.> wrote: first check in thunderclient api is working or not — Reply to this email directly, view it on GitHub <#39 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A23X73PWUMIXNKW3MJYNE4LWOHEV5ANCNFSM6AAAAAASR45ZZI . You are receiving this because you are subscribed to this thread.Message ID: @.>

I also asking him what type of error is it