Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vinaysharma9600 opened this issue Dec 2, 2022 · 3 comments

Comments

@vinaysharma9600
Copy link

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
Copy link

first check in thunderclient api is working or not

@ZAIN-BUKHARI
Copy link

ZAIN-BUKHARI commented Dec 20, 2022 via email

@MohitBansal321
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants