DEV Community

Discussion on: How To Build Rest API With NodeJS, Express, and MySQL

Collapse
 
morganmattr profile image
morganmattr

I was getting 400s (every key was returned as an error) problem, and it was just because in the Postman UI was sending the raw data as 'text' instead of 'json'. 'text' seems to be the default in the Postman UI, so make sure you switch it to json and you will stop getting the 400 error.

By the way Julia, love this guide and all your detailed explanations. Thank you for sharing!

Thread Thread
 
juliest88 profile image
Julia Strichash

Hi, I'm glad you were able to solve this, and you're right, we need to make sure it's a JSON format before we send the request.
Thanks a lot! You're very welcome! :)