Open github-learning-lab[bot] opened 4 years ago
Good Job! 🚀 Postman can be a really helpful testing tool as you continue your programming journey.
Before closing out this course, try a few more things in Postman:
Click here for one final issue to plan your next steps.
So far, we have only made GET requests to our server. A POST request can send data securely through the request body. In order to make POST requests, first we need to include the "body-parser" library from our node_modules (included with express). Add these lines after the app variable:
Let's write a function to handle a POST request made to the 'login' endpoint, as if a user was trying to log in:
Your entire file should look like this now:
Time to commit our changes!